Skip to content
Snippets Groups Projects
Commit 8c44552d authored by legac's avatar legac
Browse files

Remove current.T at the begining of a module since it prevents import outside web2py.

parent 0804e438
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ from gluon.storage import Storage
from gluon.tools import PluginManager
MSG_INVALID_TYPE = current.T("Invalid plugin type")
MSG_INVALID_TYPE = "Invalid plugin type"
class Modifier(object):
......@@ -87,6 +87,8 @@ class Modifier(object):
when the keyword argument C{xtype} is used.
"""
T = current.T
if 'plugins' in extjs:
plugins = extjs['plugins']
......@@ -104,7 +106,7 @@ class Modifier(object):
elif isinstance(el, dict):
ptypes.append(el['ptype'])
else:
raise TypeError(MSG_INVALID_TYPE)
raise TypeError(T(MSG_INVALID_TYPE))
# append new plugins replacing existing one
for plugin in plugins:
......@@ -115,7 +117,7 @@ class Modifier(object):
elif isinstance(plugin, dict):
ptype= plugin['ptype']
else:
raise TypeError(MSG_INVALID_TYPE)
raise TypeError(T(MSG_INVALID_TYPE))
if ptype in ptypes:
i = ptypes.index(ptype)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment