mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
python: Fix optargs so we don't use special sentinel values.
Previously with Python it was impossible to set a boolean or integer optarg to -1 because that was used as a special sentinel value to indicate that the optarg was not set. Instead, use None as the sentinel value, since that cannot be a boolean or integer type.
This commit is contained in:
@@ -20,6 +20,6 @@ import guestfs
|
||||
|
||||
g = guestfs.GuestFS()
|
||||
g.add_drive ("/dev/null")
|
||||
g.add_drive ("/dev/null", readonly = 1)
|
||||
g.add_drive ("/dev/null", readonly = True)
|
||||
g.add_drive ("/dev/null", iface = "virtio", format = "raw")
|
||||
g.close ()
|
||||
|
||||
Reference in New Issue
Block a user