summaryrefslogtreecommitdiffstats
path: root/pyfirstaidkit
diff options
context:
space:
mode:
authorJoel Andres Granados <jgranado@redhat.com>2008-07-14 13:41:50 +0200
committerJoel Andres Granados <jgranado@redhat.com>2008-07-14 13:41:50 +0200
commita6440d7404e7f0f2f88edd5d1eddf808cbcbb589 (patch)
tree43dc35da6b054715f0bb67df5b93e1edb002d02a /pyfirstaidkit
parentf87a133d6b734c1aa15c1070726f5b77b5648cbc (diff)
downloadfirstaidkit-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')
-rw-r--r--pyfirstaidkit/configuration.py4
-rw-r--r--pyfirstaidkit/errors.py4
-rw-r--r--pyfirstaidkit/interpret.py14
-rw-r--r--pyfirstaidkit/issue.py4
-rw-r--r--pyfirstaidkit/plugins.py44
5 files changed, 35 insertions, 35 deletions
diff --git a/pyfirstaidkit/configuration.py b/pyfirstaidkit/configuration.py
index cbf9d7b..ee260b7 100644
--- a/pyfirstaidkit/configuration.py
+++ b/pyfirstaidkit/configuration.py
@@ -56,8 +56,8 @@ def createDefaultConfig(config):
config.system.configuration = "/etc/firstaidkit"
# Frontend modules are in specified directories
- config.system.frontend = "'/usr/lib64/firstaidkit/frontend' \
- '/usr/lib/firstaidkit/frontend'"
+ config.system.frontend = ("'/usr/lib64/firstaidkit/frontend'"
+ "'/usr/lib/firstaidkit/frontend'")
#
# There will be 4 default places where FAK will look for plugins,
diff --git a/pyfirstaidkit/errors.py b/pyfirstaidkit/errors.py
index a32d1ec..061703e 100644
--- a/pyfirstaidkit/errors.py
+++ b/pyfirstaidkit/errors.py
@@ -18,8 +18,8 @@
class InvalidFlowStateException(Exception):
def __init__(self, flow):
- self.message="There appears to be an inconsistency with the %s \
- varialbe. " % flow
+ self.message="There appears to be an inconsistency with the %s "
+ "varialbe. " % flow
def __str__(self):
return self.message
diff --git a/pyfirstaidkit/interpret.py b/pyfirstaidkit/interpret.py
index f440ddb..71c1152 100644
--- a/pyfirstaidkit/interpret.py
+++ b/pyfirstaidkit/interpret.py
@@ -61,8 +61,8 @@ class Tasker:
def interrupt(self):
self._running = False
- self._reporting.info("You sent an interrupt signal to \
- Tasker! This is not recommended.", level = TASKER,
+ self._reporting.info("You sent an interrupt signal to "
+ "Tasker! This is not recommended.", level = TASKER,
origin = self, importance = logging.WARNING)
def flags(self):
@@ -88,7 +88,7 @@ class Tasker:
level = TASKER, origin = self, importance = logging.WARNING)
self._provide.provide("root")
else:
- self._reporting.info("You are not running the firstaidkit as " \
+ self._reporting.info("You are not running the firstaidkit as "
"root. Some plugins may not be available.", level = TASKER,
origin = self, importance = logging.WARNING)
self._provide.unprovide("root")
@@ -133,8 +133,8 @@ class Tasker:
not pluginSystem.getplugin(plugin).default_flow in
pluginSystem.getplugin(plugin).getFlows())):
- self._reporting.info("Plugin %s does not contain \
- flow %s"% (plugin, flow or \
+ self._reporting.info("Plugin %s does not contain "
+ "flow %s"% (plugin, flow or \
pluginSystem.getplugin(plugin).default_flow,), \
level = TASKER, origin = self)
@@ -147,8 +147,8 @@ class Tasker:
#some plugins may not be called because of unfavorable flags
for plugin in set(map(lambda x: x[0], actlist)):
- self._reporting.info("Plugin %s was not called because of \
- unsatisfied dependencies"% (plugin,), level = TASKER, \
+ self._reporting.info("Plugin %s was not called because of "
+ "unsatisfied dependencies"% (plugin,), level = TASKER, \
origin = self, importance = logging.WARNING)
# For the flags case
diff --git a/pyfirstaidkit/issue.py b/pyfirstaidkit/issue.py
index e706fa4..3896d5c 100644
--- a/pyfirstaidkit/issue.py
+++ b/pyfirstaidkit/issue.py
@@ -96,8 +96,8 @@ Return values:
class Issue(SimpleIssue):
name = "Parent issue"
- description = "This happens when you use the wrong object in the issues \
- list"
+ description = "This happens when you use the wrong object in the issues "
+ "list"
def __init__(self, plugin, reporting = None):
SimpleIssue.__init__(self, self.name, self.description)
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)