diff --git a/generator/python.ml b/generator/python.ml index 8da36bcdc..b5ab16812 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -718,8 +718,10 @@ class GuestFS(object): in libguestfs <= 1.20. \"\"\" flags = 0 - if not environment: flags |= 1 - if not close_on_exit: flags |= 2 + if not environment: + flags |= 1 + if not close_on_exit: + flags |= 2 self._o = libguestfsmod.create(flags) self._python_return_dict = python_return_dict diff --git a/python/examples/inspect_vm.py b/python/examples/inspect_vm.py index 8bfbbbcae..077157c19 100644 --- a/python/examples/inspect_vm.py +++ b/python/examples/inspect_vm.py @@ -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()