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

Unified Diff: sitescripts/extensions/utils.py

Issue 6304204159188992: Issue 1992 - createNightlies.py incorrectly determines repository name if repository path ends with… (Closed)
Patch Set: Use os.path.normpath() Created Feb. 13, 2015, 4:44 p.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
@@ -213,17 +213,17 @@ class Configuration(object):
return parser
@property
def basename(self):
metadata = self.readMetadata()
if metadata:
return metadata.get('general', 'basename')
- return os.path.basename(self.repository)
+ return os.path.basename(os.path.normpath(self.repository))
def getDownloads(self):
prefix = self.basename + '-'
command = ['hg', 'locate', '-R', self.downloadsRepo, '-r', 'default']
for filename in subprocess.check_output(command).splitlines():
if filename.startswith(prefix) and filename.endswith(self.packageSuffix):
yield (filename, filename[len(prefix):len(filename) - len(self.packageSuffix)])
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld