Skip to content

Commit

Permalink
.lstrip instead of an if with two returns
Browse files Browse the repository at this point in the history
clsoe #24
  • Loading branch information
hpfn-d committed Mar 23, 2019
1 parent 8f5b9a4 commit 67abfe2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions piuparts.py
Expand Up @@ -1650,9 +1650,7 @@ def get_state_meta_data(self):
return chroot_state

def relative(self, pathname):
if pathname.startswith('/'):
return os.path.join(self.name, pathname[1:])
return os.path.join(self.name, pathname)
return os.path.join(self.name, pathname.lstrip('/'))

def get_files_owned_by_packages(self):
"""Return dict[filename] = [packagenamelist]."""
Expand Down

0 comments on commit 67abfe2

Please sign in to comment.