diff options
author | Michal Minar <miminar@redhat.com> | 2014-02-13 08:43:56 +0100 |
---|---|---|
committer | Michal Minar <miminar@redhat.com> | 2014-02-13 14:41:32 +0100 |
commit | fc9c45fa75cb13693781e68407fcd7c8b051ec95 (patch) | |
tree | 42f5cf64253b886fc0b7770375d3274cd90b1438 /doc | |
parent | 7a795f8d6a5772a85b3b03deb140ac314ed5a10b (diff) | |
download | openlmi-scripts-fc9c45fa75cb13693781e68407fcd7c8b051ec95.tar.gz openlmi-scripts-fc9c45fa75cb13693781e68407fcd7c8b051ec95.tar.xz openlmi-scripts-fc9c45fa75cb13693781e68407fcd7c8b051ec95.zip |
turned logging messages into sentences
Which means that all messages have first letter uppercased and are
terminated with a dot.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/command-classes.rst | 2 | ||||
-rw-r--r-- | doc/mylf/lmi/scripts/mylf/__init__.py | 4 | ||||
-rw-r--r-- | doc/mylf/lmi/scripts/mylf/cmd.py | 2 | ||||
-rw-r--r-- | doc/script-development.rst | 6 | ||||
-rw-r--r-- | doc/script-tutorial.rst | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/doc/command-classes.rst b/doc/command-classes.rst index 8e6e55b..bdee7c7 100644 --- a/doc/command-classes.rst +++ b/doc/command-classes.rst @@ -41,7 +41,7 @@ methods: if ( options['--type'] is not None and options['--type'] not in file_types): raise errors.LmiInvalidOptions( - 'invalid file type given, must be one of %s' % + 'Invalid file type given, must be one of %s' % file_types) .. seealso:: diff --git a/doc/mylf/lmi/scripts/mylf/__init__.py b/doc/mylf/lmi/scripts/mylf/__init__.py index 87c349c..18bebbb 100644 --- a/doc/mylf/lmi/scripts/mylf/__init__.py +++ b/doc/mylf/lmi/scripts/mylf/__init__.py @@ -47,7 +47,7 @@ def logical_file_type_name(file_identity): try: return namemap[file_identity.classname.lower()] except KeyError: - LOG().warn('unhandled logical file class "%s"', + LOG().warn('Unhandled logical file class "%s".', file_identity.classname) return 'unknown' @@ -98,7 +98,7 @@ def get_unix_file_instance(ns, path, dereference=False): lf.TargetLink, err) return uf except: - raise errors.LmiFailed('No such file or directory: "%s"' % path) + raise errors.LmiFailed('No such file or directory: "%s".' % path) def get_logical_file_instance(ns, file_ident, dereference=False): """ diff --git a/doc/mylf/lmi/scripts/mylf/cmd.py b/doc/mylf/lmi/scripts/mylf/cmd.py index 67d6a02..59b0f32 100644 --- a/doc/mylf/lmi/scripts/mylf/cmd.py +++ b/doc/mylf/lmi/scripts/mylf/cmd.py @@ -76,7 +76,7 @@ class List(command.LmiInstanceLister): and not options['--type'].lower() in { 'any', 'file', 'directory', 'symlink', 'dev', 'socket', 'fifo'}): raise errors.LmiInvalidOptions( - 'unsupported type: %s' % options['--type']) + 'Unsupported type: %s' % options['--type']) def transform_options(self, options): file_type = options.pop('--type') diff --git a/doc/script-development.rst b/doc/script-development.rst index 82eca29..3b4a107 100644 --- a/doc/script-development.rst +++ b/doc/script-development.rst @@ -108,13 +108,13 @@ the number of instances evaluated. inst = service name = inst.path['Name'] if inst is None: - raise LmiFailed('No such service "%s"' % name) + raise LmiFailed('No such service "%s".' % name) if isinstance(inst, LMIInstanceName): # we need LMIInstance inst = inst.to_instance() res = inst.StartService() if res == 0: - LOG().debug('started service "%s" on hostname "%s"', + LOG().debug('Started service "%s" on hostname "%s".', name, ns.hostname) return res @@ -129,7 +129,7 @@ these functions operating upon a connection object like this: :: inst = c.root.cimv2.LMI_Service.first_instance( key="Name", value=service) if inst is None: - raise LmiFailed('No such service "%s"' % service) + raise LmiFailed('No such service "%s".' % service) return inst User can then easily access any other namespace he may need. Command classes diff --git a/doc/script-tutorial.rst b/doc/script-tutorial.rst index 15d6214..517a9dd 100644 --- a/doc/script-tutorial.rst +++ b/doc/script-tutorial.rst @@ -347,7 +347,7 @@ dictionary (omitted for now). and not options['--type'].lower() in { 'any', 'file', 'directory', 'symlink', 'dev', 'socket', 'fifo'}): raise errors.LmiInvalidOptions( - 'unsupported type: %s' % options['--type']) + 'Unsupported type: %s' % options['--type']) def transform_options(self, options): file_type = options.pop('--type') |