mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-19 08:59:27 +01:00
PluginDownloader: Fix decoding issue (caught in stepnem/Freenode).
This commit is contained in:
parent
9c76750ff9
commit
de8d4fbe52
@ -142,12 +142,11 @@ class GithubRepository(GitRepository):
|
||||
reload_imported = False
|
||||
for line in extractedFile.readlines():
|
||||
if minisix.PY3:
|
||||
if 'import reload' in line.decode():
|
||||
if b'import reload' in line:
|
||||
reload_imported = True
|
||||
elif not reload_imported and \
|
||||
'reload(' in line.decode():
|
||||
fd.write('from imp import reload\n' \
|
||||
.encode())
|
||||
b'reload(' in line:
|
||||
fd.write(b'from imp import reload\n')
|
||||
reload_imported = True
|
||||
fd.write(line)
|
||||
if newFileName.endswith('__init__.py'):
|
||||
|
Loading…
Reference in New Issue
Block a user