Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Anders Blomdell
apa
Commits
6047b1fe
Commit
6047b1fe
authored
Aug 23, 2019
by
Anders Blomdell
Browse files
Use tuple style of exec to make archive 2/3 compatible
Change *.iteritems() to list(*.items())
parent
4acef0cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
apa
View file @
6047b1fe
...
...
@@ -163,10 +163,7 @@ class Importer:
BAD = None
try:
code = compile(src, "%s/%s" % (self.path, filename), 'exec')
if sys.version_info < (3,):
exec("exec code in mod.__dict__")
else:
exec(code, mod.__dict__)
exec(code, mod.__dict__)
except SystemExit as e:
# Silently propagate exit
raise e
...
...
@@ -197,7 +194,7 @@ def extract(dest='.'):
\"\"\"
Extracts archived files in dest directory ('.' is default)
\"\"\"
import os
import os.path
for (m, (f, c)) in code.
iter
items():
for (m, (f, c)) in
list(
code.items()
)
:
filepath = '%s/%s' % (dest, f)
dirpath = os.path.dirname(filepath)
if os.path.exists(filepath):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment