4904: Renamed "runit.py" to "arv-web-example.py"
authorPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 14 Jan 2015 21:21:52 +0000 (16:21 -0500)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 14 Jan 2015 21:21:52 +0000 (16:21 -0500)
arv-web-example.py [moved from runit.py with 96% similarity]

similarity index 96%
rename from runit.py
rename to arv-web-example.py
index 9ab9859a4c4cb0429c19cc72ffacdf90824c1296..044f80228fc0499f6932afc1de4d01076f4ecd68 100644 (file)
--- a/runit.py
@@ -86,6 +86,8 @@ while loop:
                                        "--publish=%i:80" % (port),
                                        "--volume=%s:/mnt:ro" % mountdir,
                                        docker_image])
+        cid = cid.rstrip()
+        logging.info("Container id is %s" % cid)
 
         logging.info("Waiting for events")
         running = True
@@ -111,7 +113,7 @@ while loop:
     finally:
         if cid:
             logging.info("Stopping docker container")
-            cid = subprocess.call(["docker", "stop", cid.rstrip()])
+            cid = subprocess.call(["docker", "stop", cid])
 
         logging.info("Unmounting")
         subprocess.call(["fusermount", "-u", "-z", mountdir])