Skip to content

Commit

Permalink
removed su check
Browse files Browse the repository at this point in the history
  • Loading branch information
niallrobinson committed Aug 2, 2016
1 parent 2ccfb6e commit d7dddc8
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,6 @@
shutil.copy(os.path.join(SRC_DSDIR, "available.py"),
os.path.join(HOME_DSDIR, "available.py"))

if platform.system() in [ 'Darwin', 'Linux' ] and getpass.getuser() == 'root':
# If we're running with sudo, chown the directories and files to the user actually running the process.
uid = int(os.environ['SUDO_UID'])
gid = int(os.environ['SUDO_GID'])

os.chown(HOME_PATH, uid, gid)

for root, dirs, files in os.walk(HOME_PATH):
for dirname in dirs:
os.chown(os.path.join(root, dirname), uid, gid)

for filename in files:
os.chown(os.path.join(root, filename), uid, gid)

setup(
name = name,
Expand Down

0 comments on commit d7dddc8

Please sign in to comment.