Skip to content
This repository has been archived by the owner on Jan 3, 2018. It is now read-only.

Commit

Permalink
hopefully securely fixed updater
Browse files Browse the repository at this point in the history
  • Loading branch information
h4llow3En committed Nov 8, 2015
1 parent 6275a1c commit ce310af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tdo/todolist/maintenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ def update():
with zipfile.ZipFile('dl.zip', "r") as z:
z.extractall(".")
os.remove('dl.zip')
newdir = ''
newdir = None
for entry in os.listdir():
if re.match(r'{user}\-tdo\-.*'.format(user=user), entry):
newdir = entry
os.chdir(newdir)
subprocess.call(['python3', './setup.py', 'install'])
os.chdir('..')
if newdir != '':
if newdir is not None:
shutil.rmtree(newdir)

except AttributeError:
Expand Down

0 comments on commit ce310af

Please sign in to comment.