Index: sitescripts/extensions/bin/updateDownloadLinks.py |
=================================================================== |
--- a/sitescripts/extensions/bin/updateDownloadLinks.py |
+++ b/sitescripts/extensions/bin/updateDownloadLinks.py |
@@ -185,20 +185,21 @@ def readMetadata(repo, version): |
manifest = dom.parseString(result) |
usesSdk = manifest.getElementsByTagName('uses-sdk')[0] |
return { |
'revision': revision, |
'minSdkVersion': usesSdk.attributes["android:minSdkVersion"].value, |
} |
else: |
- try: |
+ files = subprocess.check_output(['hg', '-R', repo.repository, 'locate', '-r', version]).splitlines() |
+ if 'metadata.%s' % repo.type in files: |
command = ['hg', '-R', repo.repository, 'cat', '-r', version, os.path.join(repo.repository, 'metadata.%s' % repo.type)] |
result = subprocess.check_output(command) |
- except: |
+ else: |
# Fall back to platform-independent metadata file for now |
command = ['hg', '-R', repo.repository, 'cat', '-r', version, os.path.join(repo.repository, 'metadata')] |
result = subprocess.check_output(command) |
parser = SafeConfigParser() |
parser.readfp(StringIO(result)) |
result = { |