]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
run: Don't fail if the archive dir exists
authorZack Cerza <zack@redhat.com>
Mon, 16 Jan 2017 23:14:49 +0000 (16:14 -0700)
committerZack Cerza <zack@redhat.com>
Mon, 16 Jan 2017 23:14:49 +0000 (16:14 -0700)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/run.py

index 2c8cfbf63fa05a73ce3a4b042c0697c8d9cc25cf..35070182b6a011a0a0898485b1081e4735e0d242 100644 (file)
@@ -25,7 +25,8 @@ def set_up_logging(verbose, archive):
         teuthology.log.setLevel(logging.DEBUG)
 
     if archive is not None:
-        os.mkdir(archive)
+        if not os.path.isdir(archive):
+            os.mkdir(archive)
 
         teuthology.setup_log_file(os.path.join(archive, 'teuthology.log'))