Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: sitescripts/extensions/utils.py

Issue 29364443: Issue 4653 - Add handling for bookmarks to readMetadata (Closed)
Patch Set: Created Nov. 25, 2016, 10:56 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/extensions/utils.py
===================================================================
--- a/sitescripts/extensions/utils.py
+++ b/sitescripts/extensions/utils.py
@@ -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)
Sebastian Noack 2016/11/25 13:01:56 I think this logic belongs into readMetadata(), so
Jon Sonesen 2016/11/25 13:05:01 I agree here.
Sebastian Noack 2016/11/25 13:40:29 For reference, we discussed that a little more on
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,19 @@
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:
+ message = 'No download link found for repo: ' + repo
Sebastian Noack 2016/11/25 13:01:56 Any reason you don't pass the message directly to
Jon Sonesen 2016/11/25 13:05:01 I had it in an if statement when i was testing it
+ raise Exception(message)
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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld