diff --git a/nxt/locator.py b/nxt/locator.py index 17d0892..b91cd4b 100644 --- a/nxt/locator.py +++ b/nxt/locator.py @@ -99,7 +99,10 @@ def find_one_brick(host=None, name=None, silent=False, strict=None, debug=False, host = conf.get('Brick', 'host') name = conf.get('Brick', 'name') strict = bool(int(conf.get('Brick', 'strict'))) - method = eval('Method(%s)' % conf.get('Brick', 'method')) + methods = map(lambda x: x.strip().split('='), + conf.get('Brick', 'method').split(',')) + method = Method(**{k: v == 'True' for k, v in methods + if k in ('bluetooth', 'usb', 'device')}) if not strict: strict = True if not method: method = Method()