1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

Don't generate .pyc/.pyo files for plugins

This commit is contained in:
Jonathan Harris 2017-08-16 19:27:40 +01:00
parent 85ee02a1ed
commit b8d252ae25

View File

@ -41,8 +41,7 @@ class Plugin(object):
if loadfile:
sys.stdout.write('loading plugin %s from "%s"\n' % (name, loadfile.encode('utf-8')))
with open(loadfile, 'rb') as plugfile:
module = imp.load_module('plugin_%s' % name, plugfile, loadfile.encode(sys.getfilesystemencoding()),
('.py', 'r', imp.PY_SOURCE))
module = imp.load_module('plugin_%s' % name, plugfile, '', ('.py', 'r', imp.PY_SOURCE))
newname = module.plugin_start()
self.name = newname and unicode(newname) or name
self.module = module