Bug 779979 - Be more explicit about why mozharness can't accept a config file with wrong extension r?aki draft
authorWilliam Lachance <wlachance@mozilla.com>
Thu, 13 Apr 2017 14:31:26 -0400
changeset 562248 f0ac4ff6756a8679720b6e987512f17f26eaa4d3
parent 562247 8dd662ed33876fc7d86882fd19bc9f56d96ffa41
child 624216 d6d1d67b51cd0df0d0b172f577553cbe6772bae5
push id54001
push userwlachance@mozilla.com
push dateThu, 13 Apr 2017 18:31:44 +0000
reviewersaki
bugs779979
milestone55.0a1
Bug 779979 - Be more explicit about why mozharness can't accept a config file with wrong extension r?aki MozReview-Commit-ID: 29pQRxQzbSK
testing/mozharness/mozharness/base/config.py
--- a/testing/mozharness/mozharness/base/config.py
+++ b/testing/mozharness/mozharness/base/config.py
@@ -160,17 +160,17 @@ def parse_config_file(file_name, quiet=F
         config = local_dict[config_dict_name]
     elif file_name.endswith('.json'):
         fh = open(file_path)
         config = {}
         json_config = json.load(fh)
         config = dict(json_config)
         fh.close()
     else:
-        raise RuntimeError("Unknown config file type %s!" % file_name)
+        raise RuntimeError("Unknown config file type %s! (config files must end in .json or .py)" % file_name)
     # TODO return file_path
     return config
 
 
 def download_config_file(url, file_name):
     n = 0
     attempts = 5
     sleeptime = 60