Skip to content

Commit

Permalink
Python3 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mfitzp committed Aug 27, 2015
1 parent 6e07de0 commit 89b244a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions wooey/management/commands/addscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
try:
import urllib as request
import urlparse
except:
except ImportError:
import urllib.request as request
import urllib.urlparse as urlparse
import urllib.parse as urlparse

import zipfile
import tarfile
Expand Down Expand Up @@ -49,7 +49,6 @@ def handle(self, *args, **options):
tfile = tempfile.NamedTemporaryFile(suffix=ext)
request.urlretrieve(script, tfile.name)
script = tfile.name
print(script)

if any([script.endswith(ext) for ext in ACCEPTED_ARCHIVE_EXTENSIONS]):
# We have an archive; create a temporary folder and extract there
Expand Down Expand Up @@ -78,8 +77,6 @@ def handle(self, *args, **options):
else:
scripts.append(script) # Single script

print(scripts)

converted = 0
for script in scripts:
if script.endswith('.pyc') or '__init__' in script:
Expand Down

0 comments on commit 89b244a

Please sign in to comment.