From ff8c714ac90ba532030a5889ab9529c31a966238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 6 May 2015 21:17:23 +0200 Subject: Add possibility of calling pahe_set from outside of loop.py --- scripts/loop.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/loop.py b/scripts/loop.py index dd5949a..dbf2b70 100755 --- a/scripts/loop.py +++ b/scripts/loop.py @@ -95,9 +95,12 @@ def phase_get(): def phase_set(phs): # TODO - global thr - if thr.term: - return + try: + global thr + if thr.term: + return + except NameError: + pass with open(sf(conf.phase_file), 'w') as f: f.write(phases[phs]) -- cgit v1.2.3