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:
parent
85ee02a1ed
commit
b8d252ae25
3
plug.py
3
plug.py
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user