diff options
Diffstat (limited to 'generator/python.ml')
-rw-r--r-- | generator/python.ml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/generator/python.ml b/generator/python.ml index b4bc3cee..aa1ce8e9 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -645,9 +645,12 @@ class ClosedHandle(ValueError): class GuestFS: \"\"\"Instances of this class are libguestfs API handles.\"\"\" - def __init__ (self): + def __init__ (self, environment=True, close_on_exit=True): \"\"\"Create a new libguestfs handle.\"\"\" - self._o = libguestfsmod.create () + flags = 0 + if not environment: flags |= 1 + if not close_on_exit: flags |= 2 + self._o = libguestfsmod.create (flags) def __del__ (self): if self._o: |