summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Tools/__init__.py
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2009-04-24 22:35:03 +0000
committerSol Jerome <solj@ices.utexas.edu>2009-04-24 22:35:03 +0000
commit7f3820bc79d27bc7e19b73658d6f0cfaa5b3b53a (patch)
tree1f38a9fb89d70cb158478661cdcb2cbda098ce5f /src/lib/Client/Tools/__init__.py
parentf8b1a55d842f2beef4823b825552ff440b80c655 (diff)
downloadbcfg2-7f3820bc79d27bc7e19b73658d6f0cfaa5b3b53a.tar.gz
bcfg2-7f3820bc79d27bc7e19b73658d6f0cfaa5b3b53a.tar.bz2
bcfg2-7f3820bc79d27bc7e19b73658d6f0cfaa5b3b53a.zip
Python 2to3 updates for the Client tools
Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5178 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Tools/__init__.py')
-rw-r--r--src/lib/Client/Tools/__init__.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/Client/Tools/__init__.py b/src/lib/Client/Tools/__init__.py
index e5dedf3aa..e03ceab3a 100644
--- a/src/lib/Client/Tools/__init__.py
+++ b/src/lib/Client/Tools/__init__.py
@@ -183,7 +183,10 @@ class Tool:
return True
class PkgTool(Tool):
- '''PkgTool provides a one-pass install with fallback for use with packaging systems'''
+ '''
+ PkgTool provides a one-pass install with
+ fallback for use with packaging systems
+ '''
pkgtool = ('echo %s', ('%s', ['name']))
pkgtype = 'echo'
name = 'PkgTool'
@@ -200,7 +203,10 @@ class PkgTool(Tool):
return False
def Install(self, packages, states):
- '''Run a one-pass install, followed by single pkg installs in case of failure'''
+ '''
+ Run a one-pass install, followed by
+ single pkg installs in case of failure
+ '''
self.logger.info("Trying single pass package install for pkgtype %s" % \
self.pkgtype)
@@ -215,7 +221,7 @@ class PkgTool(Tool):
self.logger.info("Single Pass Succeded")
# set all package states to true and flush workqueues
pkgnames = [pkg.get('name') for pkg in packages]
- for entry in [entry for entry in states.keys()
+ for entry in [entry for entry in list(states.keys())
if entry.tag == 'Package'
and entry.get('type') == self.pkgtype
and entry.get('name') in pkgnames]:
@@ -256,7 +262,7 @@ class PkgTool(Tool):
def FindExtraPackages(self):
'''Find extra packages'''
packages = [entry.get('name') for entry in self.getSupportedEntries()]
- extras = [data for data in self.installed.iteritems() \
+ extras = [data for data in list(self.installed.items()) \
if data[0] not in packages]
return [Bcfg2.Client.XML.Element('Package', name=name, \
type=self.pkgtype, version=version) \