diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/imager/baseimager.py | 2 | ||||
-rw-r--r-- | scripts/lib/wic/plugin.py | 2 | ||||
-rw-r--r-- | scripts/lib/wic/utils/partitionedfs.py | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/scripts/lib/wic/imager/baseimager.py b/scripts/lib/wic/imager/baseimager.py index 760cf8a58a..557f536677 100644 --- a/scripts/lib/wic/imager/baseimager.py +++ b/scripts/lib/wic/imager/baseimager.py @@ -68,7 +68,7 @@ class BaseImageCreator(object): } # update setting from createopts - for key in createopts.keys(): + for key in createopts: if key in optmap: option = optmap[key] else: diff --git a/scripts/lib/wic/plugin.py b/scripts/lib/wic/plugin.py index 80c609cf8c..933647d7c7 100644 --- a/scripts/lib/wic/plugin.py +++ b/scripts/lib/wic/plugin.py @@ -137,7 +137,7 @@ class PluginMgr(object): return_methods = None for _source_name, klass in self.get_plugins('source').items(): if _source_name == source_name: - for _method_name in methods.keys(): + for _method_name in methods: if not hasattr(klass, _method_name): msger.warning("Unimplemented %s source interface for: %s"\ % (_method_name, _source_name)) diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index 534635b2ac..89a7c13758 100644 --- a/scripts/lib/wic/utils/partitionedfs.py +++ b/scripts/lib/wic/utils/partitionedfs.py @@ -132,7 +132,7 @@ class Image(object): for num in range(len(self.partitions)): part = self.partitions[num] - if not self.disks.has_key(part['disk_name']): + if part['disk_name'] not in self.disks: raise ImageError("No disk %s for partition %s" \ % (part['disk_name'], part['mountpoint'])) @@ -236,7 +236,7 @@ class Image(object): def __format_disks(self): self.layout_partitions() - for dev in self.disks.keys(): + for dev in self.disks: disk = self.disks[dev] msger.debug("Initializing partition table for %s" % \ (disk['disk'].device)) @@ -354,7 +354,7 @@ class Image(object): os.rename(source, image_file + '.p%d' % part['num']) def create(self): - for dev in self.disks.keys(): + for dev in self.disks: disk = self.disks[dev] disk['disk'].create() |