]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Don't bail if ~/.teuthology.yaml doesn't exist. 34/head
authorZack Cerza <zack@cerza.org>
Wed, 14 Aug 2013 19:48:45 +0000 (14:48 -0500)
committerZack Cerza <zack@cerza.org>
Wed, 14 Aug 2013 19:48:45 +0000 (14:48 -0500)
teuthology/misc.py

index 1aaa61c42dd7c8ace65d381eca978a4669c32423..bcb09ce3cb19ad7b399460226dc9794cf28d002f 100644 (file)
@@ -778,9 +778,15 @@ def get_clients(ctx, roles):
 def get_user():
     return getpass.getuser() + '@' + socket.gethostname()
 
+
 def read_config(ctx):
-    filename = os.path.join(os.environ['HOME'], '.teuthology.yaml')
     ctx.teuthology_config = {}
+    filename = os.path.join(os.environ['HOME'], '.teuthology.yaml')
+
+    if not os.path.exists(filename):
+        log.debug("%s not found", filename)
+        return
+
     with file(filename) as f:
         g = yaml.safe_load_all(f)
         for new in g: