parent
22ae6a6062
commit
a583c17ba5
|
@ -21,12 +21,6 @@ class WithPath(object):
|
||||||
def import_function(function_type, name, data, context, echoerr, module):
|
def import_function(function_type, name, data, context, echoerr, module):
|
||||||
havemarks(name, module)
|
havemarks(name, module)
|
||||||
|
|
||||||
if module == 'powerline.segments.common.players' and name == 'now_playing':
|
|
||||||
echoerr(context='Warning while checking segments (key {key})'.format(key=context.key),
|
|
||||||
context_mark=name.mark,
|
|
||||||
problem='function {0}.{1} is deprecated: use {0}.{{player_name}} instead'.format(module, name),
|
|
||||||
problem_mark=module.mark)
|
|
||||||
|
|
||||||
with WithPath(data['import_paths']):
|
with WithPath(data['import_paths']):
|
||||||
try:
|
try:
|
||||||
func = getattr(__import__(str(module), fromlist=[str(name)]), str(name))
|
func = getattr(__import__(str(module), fromlist=[str(name)]), str(name))
|
||||||
|
|
Loading…
Reference in New Issue