Merge release-0.28.17 from 'tools/mic'
[platform/upstream/mic.git] / mic / chroot.py
index a8a41db..71e35b7 100644 (file)
@@ -318,10 +318,11 @@ def chroot(chrootdir, bindmounts = None, execute = "/bin/bash"):
         msger.info("Launching shell. Exit to continue.\n"
                    "----------------------------------")
 
-        globalmounts = setup_chrootenv(chrootdir, bindmounts)
+        #globalmounts is no useless, remove it, currently function always return none.
+        setup_chrootenv(chrootdir, bindmounts)
         subprocess.call(execute, preexec_fn = mychroot, shell=True)
 
-    except OSError, err:
+    except OSError as err:
         raise errors.CreatorError("chroot err: %s" % str(err))
 
     finally: