diff options
author | Sachin Patil <psachin@redhat.com> | 2018-03-16 15:26:32 +0530 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-06-06 14:59:22 +0100 |
commit | 81d31ecf6aacda7268ebd4f795376dd22f18e6c0 (patch) | |
tree | 065afc87604dc4e81846bee7093998a50e1b3514 | |
parent | ced2719d4fcb7dc111c048f20b589b9de0b2d370 (diff) | |
download | sos-81d31ecf6aacda7268ebd4f795376dd22f18e6c0.tar.gz |
[docs] Fixed errors while generating docs.
I see below errors when generating docs using `make`. Decided to
cleanup a bit. The docstring look better than previous and no more
errors when generating docs.
```
/home/psachin/github/sos/sos/plugins/__init__.py:docstring of sos.plugins.Plugin.add_journal:5: ERROR: Unexpected indentation.
/home/psachin/github/sos/sos/plugins/__init__.py:docstring of sos.plugins.Plugin.add_journal:6: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/psachin/github/sos/sos/plugins/__init__.py:docstring of sos.plugins.Plugin.add_journal:13: WARNING: Definition list ends without a blank line; unexpected unindent.
/home/psachin/github/sos/sos/plugins/__init__.py:docstring of sos.plugins.Plugin.add_journal:15: ERROR: Unexpected indentation.
/home/psachin/github/sos/sos/plugins/__init__.py:docstring of sos.plugins.Plugin.add_journal:16: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/psachin/github/sos/sos/plugins/__init__.py:docstring of sos.plugins.Plugin.add_journal:18: WARNING: Definition list ends without a blank line; unexpected unindent.
```
I tried to keep the changes in Sphinx format. Not all functions are
changed in this patch but the one generating errors.
Let me know if anything else needs cleanup in `sos/sos/plugins/__init__.py`
Signed-off-by: Sachin Patil <psachin@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/__init__.py | 54 |
1 files changed, 31 insertions, 23 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index 46962734..d6915cc3 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -788,29 +788,37 @@ class Plugin(object): def add_journal(self, units=None, boot=None, since=None, until=None, lines=None, allfields=False, output=None, timeout=None, identifier=None, catalog=None, sizelimit=None): - """ Collect journald logs from one of more units. - - Keyword arguments: - units -- A string, or list of strings specifying the systemd - units for which journal entries will be collected. - boot -- A string selecting a boot index using the journalctl - syntax. The special values 'this' and 'last' are also - accepted. - since -- A string representation of the start time for journal - messages. - until -- A string representation of the end time for journal - messages. - lines -- The maximum number of lines to be collected. - allfields -- Include all journal fields regardless of size or - non-printable characters. - output -- A journalctl output control string, for example - "verbose". - timeout -- An optional timeout in seconds. - identifier -- an optional message identifier. - catalog -- If True, augment lines with descriptions from the - system catalog. - sizelimit -- Limit to the size of output returned in MB. Defaults - to --log-size + """Collect journald logs from one of more units. + + :param units: A string, or list of strings specifying the + systemd units for which journal entries will be + collected. + + :param boot: A string selecting a boot index using the + journalctl syntax. The special values 'this' and + 'last' are also accepted. + + :param since: A string representation of the start time for + journal messages. + + :param until: A string representation of the end time for + journal messages. + + :param lines: The maximum number of lines to be collected. + + :param allfields: A bool. Include all journal fields + regardless of size or non-printable + characters. + + :param output: A journalctl output control string, for + example "verbose". + + :param timeout: An optional timeout in seconds. + :param identifier: An optional message identifier. + :param catalog: Bool. If True, augment lines with descriptions + from the system catalog. + :param sizelimit: Limit to the size of output returned in MB. + Defaults to the value of --log-size. """ journal_cmd = "journalctl --no-pager " unit_opt = " --unit %s" |