Part 1 of issue 4276. I principle same patch as for branch, but adapeted to trunk.
svn: r15959
This commit is contained in:
@@ -1052,8 +1052,6 @@ class PluginRegister(object):
|
||||
lenpd = len(self.__plugindata)
|
||||
full_filename = os.path.join(dir, filename)
|
||||
local_gettext = get_addon_translator(full_filename).gettext
|
||||
if type(full_filename) == str:
|
||||
full_filename = unicode(full_filename, sys.getfilesystemencoding())
|
||||
try:
|
||||
#execfile(full_filename,
|
||||
execfile(full_filename.encode(sys.getfilesystemencoding()),
|
||||
|
@@ -40,6 +40,7 @@ import os
|
||||
#-------------------------------------------------------------------------
|
||||
from gen.plug._pluginreg import make_environment
|
||||
import const
|
||||
import Utils
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -278,7 +279,7 @@ def load_addon_file(path, callback=None):
|
||||
gpr_files = set([os.path.split(os.path.join(const.USER_PLUGINS, name))[0]
|
||||
for name in good_gpr])
|
||||
for gpr_file in gpr_files:
|
||||
u_gpr_file = unicode(gpr_file, sys.getfilesystemencoding())
|
||||
u_gpr_file = Utils.get_unicode_path_from_file_chooser(gpr_file)
|
||||
if callback:
|
||||
callback(" " + (_("Registered '%s'") % u_gpr_file) + "\n")
|
||||
file_obj.close()
|
||||
|
Reference in New Issue
Block a user