summaryrefslogtreecommitdiffstats
path: root/python/examples/create_disk.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/examples/create_disk.py')
-rw-r--r--python/examples/create_disk.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/examples/create_disk.py b/python/examples/create_disk.py
index 0885383e..86f50427 100644
--- a/python/examples/create_disk.py
+++ b/python/examples/create_disk.py
@@ -51,6 +51,11 @@ g.mkdir ("/foo")
# the disk image.
g.upload ("/etc/resolv.conf", "/foo/resolv.conf")
+# Because we wrote to the disk and we want to detect write
+# errors, call g.shutdown. You don't need to do this:
+# g.close will do it implicitly.
+g.shutdown ()
+
# Note also that handles are automatically closed if they are
# reaped by reference counting. You only need to call close
# if you want to close the handle right away.