diff options
-rw-r--r-- | docs/conf.py | 2 | ||||
-rw-r--r-- | docs/policies.rst | 2 | ||||
-rw-r--r-- | sos/plugins/__init__.py | 2 | ||||
-rw-r--r-- | sos/policies/__init__.py | 15 | ||||
-rw-r--r-- | sos/utilities.py | 7 |
5 files changed, 16 insertions, 12 deletions
diff --git a/docs/conf.py b/docs/conf.py index 80fcd019..2452a8c2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -135,7 +135,7 @@ html_theme = 'default' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = [] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied diff --git a/docs/policies.rst b/docs/policies.rst index 0c32a519..56fb1c23 100644 --- a/docs/policies.rst +++ b/docs/policies.rst @@ -1,5 +1,5 @@ ``sos.policies`` --- Policy Interface -=================================== +===================================== .. automodule:: sos.policies :noindex: diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index 7bc17103..e528c41c 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -75,7 +75,7 @@ class Plugin(object): this and set the class variables where applicable. plugin_name is a string returned by plugin.name(). If this is set to None - (the default) class_.__name__.tolower() will be returned. Be sure to set + (the default) class\_.__name__.tolower() will be returned. Be sure to set this if you are defining multiple plugins that do the same thing on different platforms. diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py index 20e0e3b6..af8ed757 100644 --- a/sos/policies/__init__.py +++ b/sos/policies/__init__.py @@ -46,8 +46,9 @@ def load(cache={}, sysroot=None): class PackageManager(object): """Encapsulates a package manager. If you provide a query_command to the constructor it should print each package on the system in the following - format: - package name|package.version\n + format:: + + package name|package.version You may also subclass this class and provide a get_pkg_list method to build the list of packages and versions. @@ -88,10 +89,12 @@ class PackageManager(object): return None def get_pkg_list(self): - """ - returns a dictionary of packages in the following format: - {'package_name': {'name': 'package_name', ' - version': 'major.minor.version'}} + """Returns a dictionary of packages in the following + format:: + + {'package_name': {'name': 'package_name', + 'version': 'major.minor.version'}} + """ if self.query_command: cmd = self.query_command diff --git a/sos/utilities.py b/sos/utilities.py index a8d4cf81..588cb3f4 100644 --- a/sos/utilities.py +++ b/sos/utilities.py @@ -68,10 +68,11 @@ def convert_bytes(bytes_, K=1 << 10, M=1 << 20, G=1 << 30, T=1 << 40): def find(file_pattern, top_dir, max_depth=None, path_pattern=None): - """generator function to find files recursively. Usage: + """Generator function to find files recursively. + Usage:: - for filename in find("*.properties", "/var/log/foobar"): - print filename + for filename in find("*.properties", "/var/log/foobar"): + print filename """ if max_depth: base_depth = os.path.dirname(top_dir).count(os.path.sep) |