ext_scripts: Fix bug in attach
authorFilippos Giannakos <philipgian@grnet.gr>
Wed, 18 Dec 2013 17:27:15 +0000 (19:27 +0200)
committerFilippos Giannakos <philipgian@grnet.gr>
Tue, 28 Jan 2014 15:03:06 +0000 (17:03 +0200)
Fix bug in attach when checking whether volume is already mapped.

xseg/tools/ext_scripts/vlmc_wrapper.py

index c19f983..83b9298 100755 (executable)
@@ -96,7 +96,7 @@ def attach(env):
 
     # Check if the mapping already exists
     d_id = vlmc.is_mapped(name)
-    if d_id:
+    if d_id is not None:
       # The mapping exists. Return it.
         sys.stdout.write("%s" % str(DEVICE_PREFIX + str(d_id)))
         return 0