Bug 1071313 - Allow zips from other foreign locations in ash, throw correct error when zip is not allowed;r=kmoir
authorWilliam Lachance <wlachance@mozilla.com>
Wed, 24 Sep 2014 12:25:39 -0400
changeset 207063 f294836b305bd8a7ff201b0990ea5ca4887a4992
parent 207062 c94ca8f85baff718ded14b3258c181b16ce4c046
child 207064 37935ebab1d199850cd01ce24732ba1f65c873e1
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerskmoir
bugs1071313
milestone35.0a1
Bug 1071313 - Allow zips from other foreign locations in ash, throw correct error when zip is not allowed;r=kmoir
testing/talos/talos_from_code.py
--- a/testing/talos/talos_from_code.py
+++ b/testing/talos/talos_from_code.py
@@ -48,33 +48,35 @@ def main():
         key = 'talos.zip'
         entity = get_value(jsonFilename, key)
         if passesRestrictions(options.talos_json_url, entity["url"]):
             # the key is at the same time the filename e.g. talos.zip
             print "INFO: Downloading %s as %s" % (entity["url"], os.path.join(entity["path"], key))
             download_file(entity["url"], entity["path"], key)
         else:
             print "ERROR: You have tried to download a file " + \
-                  "from: %s " % fileUrl + \
+                  "from: %s " % entity["url"] + \
                   "which is a location different than http://talos-bundles.pvt.build.mozilla.org/"
             print "ERROR: This is only allowed for the certain branches."
             sys.exit(1)
     except Exception, e:
         print "ERROR: %s" % str(e)
         sys.exit(1)
 
 def passesRestrictions(talosJsonUrl, fileUrl):
     '''
     Only certain branches are exempted from having to host their downloadable files
     in talos-bundles.pvt.build.mozilla.org
     '''
-    if talosJsonUrl.startswith("http://hg.mozilla.org/try/") == True or \
-       talosJsonUrl.startswith("https://hg.mozilla.org/try/") == True or \
-       talosJsonUrl.startswith("http://hg.mozilla.org/projects/pine/") == True or \
-       talosJsonUrl.startswith("https://hg.mozilla.org/projects/pine/") == True:
+    if talosJsonUrl.startswith("http://hg.mozilla.org/try/") or \
+       talosJsonUrl.startswith("https://hg.mozilla.org/try/") or \
+       talosJsonUrl.startswith("http://hg.mozilla.org/projects/pine/") or \
+       talosJsonUrl.startswith("https://hg.mozilla.org/projects/pine/") or \
+       talosJsonUrl.startswith("http://hg.mozilla.org/projects/ash/") or \
+       talosJsonUrl.startswith("https://hg.mozilla.org/projects/ash/"):
         return True
     else:
         p = re.compile('^http://talos-bundles.pvt.build.mozilla.org/')
         m = p.match(fileUrl)
         if m == None:
             return False
         return True