summaryrefslogtreecommitdiffstats
path: root/python/t
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-08-15 12:14:39 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-08-15 12:16:54 +0100
commit42e8c093b74ac578ef75c6f3aefdbea7f46478e1 (patch)
tree3761f877da99448600df4aea0c7ddcfe5cf884e6 /python/t
parente990e80c266db84e5c9e4198e44307958a9cd19c (diff)
downloadlibguestfs-42e8c093b74ac578ef75c6f3aefdbea7f46478e1.tar.gz
libguestfs-42e8c093b74ac578ef75c6f3aefdbea7f46478e1.tar.xz
libguestfs-42e8c093b74ac578ef75c6f3aefdbea7f46478e1.zip
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.
Diffstat (limited to 'python/t')
-rw-r--r--python/t/060-optargs.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/t/060-optargs.py b/python/t/060-optargs.py
index ae2d934d..241185bb 100644
--- a/python/t/060-optargs.py
+++ b/python/t/060-optargs.py
@@ -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 ()