diff options
Diffstat (limited to 'abs/core/LinHES-config/timezip.py')
-rwxr-xr-x | abs/core/LinHES-config/timezip.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/abs/core/LinHES-config/timezip.py b/abs/core/LinHES-config/timezip.py index ca20921..4e494be 100755 --- a/abs/core/LinHES-config/timezip.py +++ b/abs/core/LinHES-config/timezip.py @@ -106,9 +106,10 @@ def selectvars(): result = cursor.fetchone() try: hobbitclient=result[0] - except TypeError: + except: + hobbitclient="1" + else: hobbitclient="1" - def insertvars(): @@ -184,7 +185,7 @@ def insertvars(): #hobbitclient cursor.execute("select * from settings where value='HostServiceHobbitclient' and hostname=(%s)",(thishostname)) result = cursor.fetchone() - if ( tz != ""): + if ( hobbitclient != ""): if (result == None): cursor.execute("INSERT INTO settings (value,data,hostname) VALUES ('HostServiceHobbitclient',(%s),(%s))",(hobbitclient,thishostname)) print "inserting hobbitcleint" |