If the permission is an int, then simply return it

It doesn't seem necessary to convert it, and if it does, then
we're missing a test
This commit is contained in:
Johnny Robeson 2016-06-14 03:50:29 -04:00
parent 8e1bc16228
commit 44380db6e8

View file

@ -16,11 +16,10 @@ from beets.util import ancestry
def convert_perm(perm):
"""If the perm is a int it will first convert it to a string and back
to an oct int. Else it just converts it to oct.
"""If the perm is a int then just return it, otherwise convert it to oct.
"""
if isinstance(perm, int):
return int(bytes(perm), 8)
return perm
else:
return int(perm, 8)