Bug 779979 - Be more explicit about why mozharness can't accept a config file with wrong extension r?aki
MozReview-Commit-ID: 29pQRxQzbSK
--- 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