Try to convert uid first

This commit is contained in:
Oleksii Shevchuk 2017-05-07 18:29:06 +03:00
parent 5007957722
commit d830ac45c5
1 changed files with 5 additions and 0 deletions

View File

@ -19,6 +19,11 @@ from pupy import obtain
def prepare(suid=None):
if suid is not None:
try:
suid = int(suid)
except:
pass
try:
if not type(suid) in (int, long):
import pwd