1
0
mirror of https://github.com/gsi-upm/senpy synced 2024-11-22 00:02:28 +00:00

Fix for async

Should fix #11
This commit is contained in:
J. Fernando Sánchez 2017-03-01 12:25:07 +01:00
parent a0ff528a4b
commit 99403b3443

View File

@ -253,7 +253,7 @@ class Senpy(object):
logger.error(msg)
raise Error(msg)
if sync:
if sync or 'async' in plugin and not plugin.async:
act()
else:
th = Thread(target=act)
@ -277,7 +277,7 @@ class Senpy(object):
"Error deactivating plugin {}: {}".format(plugin.name, ex))
logger.error("Trace: {}".format(traceback.format_exc()))
if sync:
if sync or 'async' in plugin and not plugin.async:
deact()
else:
th = Thread(target=deact)