handle an empty relpath correctly

This commit is contained in:
Mike Bonnet 2010-08-02 14:42:18 -04:00
parent e8aa28234d
commit 68dd16db6d
3 changed files with 10 additions and 2 deletions

View file

@ -1390,6 +1390,14 @@ class PathInfo(object):
"""Return the directory where the Windows build exists"""
return self.build(build) + '/win'
def winfile(self, wininfo):
"""Return the relative path from the winbuild directory where the
file identified by wininfo is located."""
filepath = wininfo['filename']
if wininfo.get('relpath'):
filepath = wininfo['relpath'] + '/' + filepath
return filepath
def mavenrepo(self, build, maveninfo):
"""Return the directory where the Maven artifact exists in the per-tag Maven repo
(/mnt/koji/repos/tag-name/repo-id/maven2/)"""