Bug 779979 - Be more explicit about why mozharness can't accept a config file with wrong extension r=aki
authorWilliam Lachance <wlachance@mozilla.com>
Thu, 13 Apr 2017 14:31:26 -0400
changeset 353056 5fccdd8de0ae9d2ef16d09f8117992f18ccaffa7
parent 353055 7fda04f46791e733f3ebcd0a511199007fc27e2f
child 353057 f709675d6a7995634356b65e1f46ccea56345e9e
push id31656
push userihsiao@mozilla.com
push dateFri, 14 Apr 2017 09:10:41 +0000
treeherdermozilla-central@cda24082bff8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaki
bugs779979
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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