Skip to content

Commit

Permalink
🐛 fix other issues related to python2 to 3 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
bunop committed Feb 7, 2022
1 parent c987299 commit b6c9727
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Lib/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def getSnapshotXML(self):
# now construct all diskspec
diskspecs = []

for disk in self.disks.iterkeys():
for disk in iter(self.disks):
diskspecs += [
"--diskspec %s,file=/var/lib/libvirt/images/snapshot"
"_%s_%s-%s.img" % (
Expand All @@ -248,7 +248,7 @@ def getSnapshotXML(self):
shell=False)

# read output in xml
self.snapshot_xml = create_xml.stdout.read()
self.snapshot_xml = create_xml.stdout.read().decode("ascii")

# Lancio il comando e aspetto che termini
status = create_xml.wait()
Expand Down Expand Up @@ -312,7 +312,7 @@ def doBlockCommit(self):

# A blockcommit for every disks. Using names like libvirt variables.
# Base is the original image file
for disk in self.disks.iterkeys():
for disk in iter(self.disks):
# the command to execute
my_cmd = (
"virsh blockcommit {domain_name} {disk} --active "
Expand Down

0 comments on commit b6c9727

Please sign in to comment.