diff options
author | Joel Andres Granados <jgranado@redhat.com> | 2008-07-14 13:41:50 +0200 |
---|---|---|
committer | Joel Andres Granados <jgranado@redhat.com> | 2008-07-14 13:41:50 +0200 |
commit | a6440d7404e7f0f2f88edd5d1eddf808cbcbb589 (patch) | |
tree | 43dc35da6b054715f0bb67df5b93e1edb002d02a /pyfirstaidkit/plugins.py | |
parent | f87a133d6b734c1aa15c1070726f5b77b5648cbc (diff) | |
download | firstaidkit-a6440d7404e7f0f2f88edd5d1eddf808cbcbb589.tar.gz firstaidkit-a6440d7404e7f0f2f88edd5d1eddf808cbcbb589.tar.xz firstaidkit-a6440d7404e7f0f2f88edd5d1eddf808cbcbb589.zip |
Avoid the ugly space left by adding "\" to a string separation.
When deviding a string into two lines one must use pythons automatic
string concatenation (python concatenates strings that are in different
line but are inside parenthesis). Do not use the "\" in the string as
this will cause strange and unwanted output.
Yes:
print("long string"
"rest of string")
No:
print("long string \
rest of string")
Diffstat (limited to 'pyfirstaidkit/plugins.py')
-rw-r--r-- | pyfirstaidkit/plugins.py | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/pyfirstaidkit/plugins.py b/pyfirstaidkit/plugins.py index 5bd857f..4d7ce14 100644 --- a/pyfirstaidkit/plugins.py +++ b/pyfirstaidkit/plugins.py @@ -284,8 +284,8 @@ class Plugin(object): """ #We want these functions to be overridden by the plugin developer. if self.__class__ is Plugin: - Logger.warning("Prepare is an abstract method, it should be used \ - as such.") + Logger.warning("Prepare is an abstract method, it should be used " + "as such.") def clean(self): """Final actions. @@ -297,36 +297,36 @@ class Plugin(object): """ #We want these functions to be overridden by the plugin developer. if self.__class__ is Plugin: - Logger.warning("Clean is an abstract method, it should be used as \ - such.") + Logger.warning("Clean is an abstract method, it should be used as " + "such.") def backup(self): """Gather important information needed for restore.""" #We want these functions to be overridden by the plugin developer. if self.__class__ is Plugin: - Logger.warning("Backup is an abstract method, it should be used as \ - such.") + Logger.warning("Backup is an abstract method, it should be used as " + "such.") def restore(self): """Try to restore the previous state described in backup.""" #We want these functions to be overridden by the plugin developer. if self.__class__ is Plugin: - Logger.warning("Restore is an abstract method, it should be used \ - as such.") + Logger.warning("Restore is an abstract method, it should be used " + "as such.") def diagnose(self): """Diagnose the situation.""" #We want these functions to be overridden by the plugin developer. if self.__class__ is Plugin: - Logger.warning("Diagnose is an abstract method, it should be used \ - as such.") + Logger.warning("Diagnose is an abstract method, it should be used " + "as such.") def fix(self): """Try to fix whatever is wrong in the system.""" #We want these functions to be overridden by the plugin developer. if self.__class__ is Plugin: - Logger.warning("Fix is an abstract method, it should be used as \ - such.") + Logger.warning("Fix is an abstract method, it should be used as " + "such.") class IssuesPlugin(Plugin): """Plugin which uses Issue classes to test smaller and INDEPENDENT issues. @@ -446,12 +446,12 @@ class FlagTrackerPlugin(Plugin): """Decide about state of higher level flags.""" #We want these functions to be overridden by the plugin developer. if self.__class__ is FlagTrackerPlugin: - Logger.warning("Decide is an abstract method, it should be used \ - as such.") + Logger.warning("Decide is an abstract method, it should be used " + "as such.") if self.flag_decide is None: - Logger.warning("You have to specify flag to set when everything \ - is ok.") + Logger.warning("You have to specify flag to set when everything " + "is ok.") return Return for flag in self.flag_list: @@ -522,13 +522,13 @@ class PluginSystem(object): #reverse-dependencies self._deps.introduce(module.get_plugin().getConflicts()) self._plugins[m] = module - self._reporting.debug("Module %s successfully imported \ - with basedir %s" % + self._reporting.debug("Module %s successfully imported " + "with basedir %s" % (m, os.path.dirname(module.__file__)), level = PLUGINSYSTEM, origin = self) except Exception, e: - self._reporting.error(message = "Module %s was NOT \ - imported, because of %s" % + self._reporting.error(message = "Module %s was NOT " + "imported, because of %s" % (m, str(e)), level = PLUGINSYSTEM, origin = self) finally: imp.release_lock() @@ -569,8 +569,8 @@ class PluginSystem(object): Logger.info("Using %s flow" % flowName) if flowName not in flows: - self._reporting.exception(message = "Flow %s does not exist in \ - plugin %s" % (flowName, plugin), level = PLUGINSYSTEM, + self._reporting.exception(message = "Flow %s does not exist in " + "plugin %s" % (flowName, plugin), level = PLUGINSYSTEM, origin = self) self._reporting.stop(level=PLUGIN, origin=self, message=plugin) raise InvalidFlowNameException(flowName) |