]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Don't return inside __init__ 54/head
authorZack Cerza <zack@cerza.org>
Wed, 28 Aug 2013 16:19:04 +0000 (11:19 -0500)
committerZack Cerza <zack@cerza.org>
Wed, 28 Aug 2013 16:36:36 +0000 (11:36 -0500)
teuthology/config.py

index 45b0b92add877ef84bb77b4a4d4c738eb19f16c9..24e466f5b8dded2f2bac5ae67aaf87b18755222b 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 import os
 import yaml
 import logging
@@ -15,12 +14,11 @@ class _Config(object):
     ~/.teuthology.yaml and nothing else.
     """
     def __init__(self):
-        if not os.path.exists(CONF_FILE):
+        if os.path.exists(CONF_FILE):
+            self.__conf = yaml.safe_load(file(CONF_FILE))
+        else:
             log.debug("%s not found", CONF_FILE)
             self.__conf = {}
-            return
-
-        self.__conf = yaml.safe_load(file(CONF_FILE))
 
     # This property declaration exists mainly as an example; it is not
     # necessary unless you want to, say, define a set method and/or a