mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
python: PEP 8: break compound statements
Avoid compound statements, simply indenting their blocks. No functional changes.
This commit is contained in:
@@ -39,7 +39,8 @@ for root in roots:
|
||||
# Sort keys by length, shortest first, so that we end up
|
||||
# mounting the filesystems in the correct order.
|
||||
mps = g.inspect_get_mountpoints(root)
|
||||
def compare(a, b): return len(a) - len(b)
|
||||
def compare(a, b):
|
||||
return len(a) - len(b)
|
||||
for device in sorted(mps.keys(), compare):
|
||||
try:
|
||||
g.mount_ro(mps[device], device)
|
||||
@@ -51,7 +52,8 @@ for root in roots:
|
||||
if g.is_file(filename):
|
||||
print "--- %s ---" % filename
|
||||
lines = g.head_n(3, filename)
|
||||
for line in lines: print line
|
||||
for line in lines:
|
||||
print line
|
||||
|
||||
# Unmount everything.
|
||||
g.umount_all()
|
||||
|
||||
Reference in New Issue
Block a user