Skip to content

Commit

Permalink
🐛 replace d.iteritems with iter(d.items())
Browse files Browse the repository at this point in the history
  • Loading branch information
bunop committed Feb 7, 2022
1 parent 48581fa commit c987299
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Lib/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def callSnapshot(self):
self.snapshot_disk = self.getDisks()

# debug
for disk, top in self.snapshot_disk.iteritems():
for disk, top in iter(self.snapshot_disk.items()):
logger.debug(
"Created top image {top} for {domain_name} {disk}".format(
top=top, domain_name=domain.name(), disk=disk))
Expand Down Expand Up @@ -353,7 +353,7 @@ def doBlockCommit(self):
# pivoted
test_disks = self.getDisks()

for disk, base in self.disks.iteritems():
for disk, base in iter(self.disks.items()):
test_base = test_disks[disk]
top = self.snapshot_disk[disk]

Expand Down
4 changes: 2 additions & 2 deletions kvmBackup.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def backup(domain, parameters, backupdir):
(domain, tar_path))

# copying file
for disk, source in snapshot.disks.iteritems():
for disk, source in iter(snapshot.disks.items()):
dest = os.path.join(datadir, os.path.basename(source))

logger.debug("copying '%s' to '%s'" % (source, dest))
Expand Down Expand Up @@ -268,7 +268,7 @@ def backup(domain, parameters, backupdir):
# debug
# pprint.pprint(mydomains)

for domain_name, parameters in mydomains.iteritems():
for domain_name, parameters in iter(mydomains.items()):
# check if bakcup is needed
domain_backup = False

Expand Down

0 comments on commit c987299

Please sign in to comment.