From 44380db6e8dc6ed5e656b00444b6171accd90562 Mon Sep 17 00:00:00 2001 From: Johnny Robeson Date: Tue, 14 Jun 2016 03:50:29 -0400 Subject: [PATCH] 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 --- beetsplug/permissions.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/beetsplug/permissions.py b/beetsplug/permissions.py index cf06a96d5..b2c5e7fb0 100644 --- a/beetsplug/permissions.py +++ b/beetsplug/permissions.py @@ -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)