Refactor - leverage koji.util.relpath()

Per mikem's request:
https://pagure.io/koji/pull-request/233#comment-22971
This commit is contained in:
John Florian 2017-03-31 11:00:36 -04:00 committed by Mike McLean
parent 3e2a737e32
commit 0aa10b925b

View file

@ -718,7 +718,7 @@ class BuildRoot(object):
raise ValueError(
'path %r is not within the BuildRoot at %r' % (path, root)
)
return os.path.join('/', os.path.relpath(path, root))
return os.path.join('/', koji.util.relpath(path, root))
def resultdir(self):
return "%s/%s/result" % (self.options.mockdir, self.name)