summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Client/Tools/SYSV.py
diff options
context:
space:
mode:
authorMichael Fenn <fennm@deshawresearch.com>2014-11-06 14:05:42 -0500
committerMichael Fenn <fennm@deshawresearch.com>2014-11-06 15:06:34 -0500
commitdccd33a479c0ff14d90d2939534f91964e1a393c (patch)
tree3ddbe3b32f0f1b00ce78d9194df7e3b98c9a1f1e /src/lib/Bcfg2/Client/Tools/SYSV.py
parent84ba7561d9450d05b0dd99b69c16437b29100704 (diff)
downloadbcfg2-dccd33a479c0ff14d90d2939534f91964e1a393c.tar.gz
bcfg2-dccd33a479c0ff14d90d2939534f91964e1a393c.tar.bz2
bcfg2-dccd33a479c0ff14d90d2939534f91964e1a393c.zip
SYSV: change instances of simplename to simplefile
This is to better match the schema since simplefile already exists. The previous simplename attribute would fail validation. Since pkgmgr already helpfully constructs url for you if simplefile exists, the tool no longer needs to do the concatenation itself. Given the low usage rate of SYSV.py and that the original functionality was introduced in a late 1.3 release, changing the name w/o providing backwards compatiblity seems reasonable.
Diffstat (limited to 'src/lib/Bcfg2/Client/Tools/SYSV.py')
-rw-r--r--src/lib/Bcfg2/Client/Tools/SYSV.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/SYSV.py b/src/lib/Bcfg2/Client/Tools/SYSV.py
index a29b49efa..27c3d3785 100644
--- a/src/lib/Bcfg2/Client/Tools/SYSV.py
+++ b/src/lib/Bcfg2/Client/Tools/SYSV.py
@@ -52,18 +52,17 @@ class SYSV(Bcfg2.Client.Tools.PkgTool):
self.origpkgtool = self.pkgtool
def pkgmogrify(self, packages):
- """ Take a list of pkg objects, check for a 'simplename' attribute.
+ """ Take a list of pkg objects, check for a 'simplefile' attribute.
If present, insert a _sysv_pkg_path attribute to the package and
download the datastream format SYSV package to a temporary file.
"""
for pkg in packages:
- if pkg.get('simplename'):
+ if pkg.get('simplefile'):
tmpfile = tempfile.NamedTemporaryFile()
self.tmpfiles.append(tmpfile)
- self.logger.info("Downloading %s%s to %s" % (pkg.get('url'),
- pkg.get('simplename'), tmpfile.name))
- urlretrieve("%s/%s" % (pkg.get('url'), pkg.get('simplename')),
- tmpfile.name)
+ self.logger.info("Downloading %s to %s" % (pkg.get('url'),
+ tmpfile.name))
+ urlretrieve(pkg.get('url'), tmpfile.name)
pkg.set('_sysv_pkg_path', tmpfile.name)
def _get_package_command(self, packages):