summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/Bcfg2/Client/Tools/SYSV.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/SYSV.py b/src/lib/Bcfg2/Client/Tools/SYSV.py
index 48d67c4f1..712dcce32 100644
--- a/src/lib/Bcfg2/Client/Tools/SYSV.py
+++ b/src/lib/Bcfg2/Client/Tools/SYSV.py
@@ -67,12 +67,14 @@ class SYSV(Bcfg2.Client.Tools.PkgTool):
def _get_package_command(self, packages):
"""Override the default _get_package_command, replacing the attribute
'url' if '_sysv_pkg_path' if necessary in the returned command
- string"""
- if len(packages) == 1 and '_sysv_pkg_path' in packages[0].keys():
- self.pkgtool = (self.pkgtool[0], ('%s %s',
- ['_sysv_pkg_path', 'name']))
- else:
- self.pkgtool = self.origpkgtool
+ string
+ """
+ if hasattr(self, 'origpkgtool'):
+ if len(packages) == 1 and '_sysv_pkg_path' in packages[0].keys():
+ self.pkgtool = (self.pkgtool[0], ('%s %s',
+ ['_sysv_pkg_path', 'name']))
+ else:
+ self.pkgtool = self.origpkgtool
pkgcmd = super(SYSV, self)._get_package_command(packages)
self.logger.debug("Calling install command: %s" % pkgcmd)