Merge pull request #11 from arkarthick/master

Time to commit using my git id.
diff --git a/src/test/utils/CordContainer.py b/src/test/utils/CordContainer.py
index de4ec2f..8ad4c2e 100644
--- a/src/test/utils/CordContainer.py
+++ b/src/test/utils/CordContainer.py
@@ -86,10 +86,11 @@
 
     @classmethod
     def cleanup(cls, image):
-        cnt_list = filter(lambda c: c['Image'] == image, cls.dckr.containers())
+        cnt_list = filter(lambda c: c['Image'] == image, cls.dckr.containers(all=True))
         for cnt in cnt_list:
             print('Cleaning container %s' %cnt['Id'])
-            cls.dckr.kill(cnt['Id'])
+            if cnt['State'] == 'running':
+                cls.dckr.kill(cnt['Id'])
             cls.dckr.remove_container(cnt['Id'], force=True)
 
     @classmethod