summaryrefslogtreecommitdiff
path: root/scripts/template_verifier.py
diff options
context:
space:
mode:
authorRyan Williams <rdw@lindenlab.com>2007-07-20 22:10:59 +0000
committerRyan Williams <rdw@lindenlab.com>2007-07-20 22:10:59 +0000
commitdd6a0467ed9c151a819626cf811553e4a8880e84 (patch)
tree6bdec52e00675674bb926a4542ebfebcb2971e05 /scripts/template_verifier.py
parent987d14fd466a645cf32dff7bdea699b34325196c (diff)
Fix parabuild breakage. Why the F is urllib opening an ftp connection to localhost? Not reviewed.
Diffstat (limited to 'scripts/template_verifier.py')
-rwxr-xr-xscripts/template_verifier.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/template_verifier.py b/scripts/template_verifier.py
index 6fbb787f6f..e70299c429 100755
--- a/scripts/template_verifier.py
+++ b/scripts/template_verifier.py
@@ -94,8 +94,13 @@ def compare(base, current, mode):
return False, compat
def fetch(url):
- # *FIX: this doesn't throw an exception for a 404, and oddly enough the sl.com 404 page actually gets parsed successfully
- return ''.join(urllib.urlopen(url).readlines())
+ if url.startswith('file://'):
+ # just open the file directly because urllib is dumb about these things
+ file_name = url[len('file://'):]
+ return open(file_name).read()
+ else:
+ # *FIX: this doesn't throw an exception for a 404, and oddly enough the sl.com 404 page actually gets parsed successfully
+ return ''.join(urllib.urlopen(url).readlines())
def cache_master(master_url):
"""Using the url for the master, updates the local cache, and returns an url to the local cache."""