From de8d4fbe52db729d199541e6c983d41694a9b4ff Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 1 Aug 2016 16:09:11 +0200 Subject: [PATCH] PluginDownloader: Fix decoding issue (caught in stepnem/Freenode). --- plugins/PluginDownloader/plugin.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/PluginDownloader/plugin.py b/plugins/PluginDownloader/plugin.py index d604384c6..085e147a4 100644 --- a/plugins/PluginDownloader/plugin.py +++ b/plugins/PluginDownloader/plugin.py @@ -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'):