Index: sitescripts/extensions/utils.py |
=================================================================== |
--- a/sitescripts/extensions/utils.py |
+++ b/sitescripts/extensions/utils.py |
@@ -178,17 +178,17 @@ |
self.nightlyConfig.add_section(self.repositoryName) |
def __str__(self): |
""" |
Provides a string representation of this configuration |
""" |
return self.repositoryName |
- def readMetadata(self, version='tip'): |
+ def readMetadata(self, version): |
genericFilename = 'metadata' |
filename = '%s.%s' % (genericFilename, self.type) |
files = subprocess.check_output(['hg', '-R', self.repository, |
'locate', '-r', version]).splitlines() |
if filename not in files: |
# some repositories like those for Android and |
# Internet Explorer don't have metadata files |
@@ -202,17 +202,17 @@ |
result = subprocess.check_output(command) |
parser = SafeConfigParser() |
parser.readfp(StringIO(result)) |
return parser |
def getDownloads(self): |
- metadata = self.readMetadata() |
+ metadata = self.readMetadata(self.revision) |
if metadata: |
prefix = metadata.get('general', 'basename') |
else: |
prefix = os.path.basename(os.path.normpath(self.repository)) |
prefix += '-' |
command = ['hg', 'locate', '-R', self.downloadsRepo, '-r', 'default'] |
for filename in subprocess.check_output(command).splitlines(): |
@@ -311,16 +311,18 @@ |
def getDownloadLinks(result): |
""" |
gets the download links for all extensions and puts them into the config |
object |
""" |
for repo in Configuration.getRepositoryConfigurations(): |
try: |
(downloadURL, version) = _getDownloadLink(repo) |
+ if downloadURL is None: |
+ raise Exception('No download link found for repo: ' + repo) |
except: |
traceback.print_exc() |
continue |
if not result.has_section(repo.repositoryName): |
result.add_section(repo.repositoryName) |
result.set(repo.repositoryName, 'downloadURL', downloadURL) |
result.set(repo.repositoryName, 'version', version) |