From 0ca1e6dfa7fb400f2aa2cde2eced5df44d19814f Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 12 Oct 2012 18:17:29 +0200 Subject: [PATCH] fixup --- db_add.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db_add.py b/db_add.py index df56f06..b3e8e96 100755 --- a/db_add.py +++ b/db_add.py @@ -32,11 +32,12 @@ def db_add_job(con, name): def harmonize_timeformat(time): logger.debug('1 time = %s' % time) if time != 'NULL': - if time.isdigit(): + try: + if time.isdigit(): logger.debug('2 time = %s' % time) time = "to_timestamp('%s')" % time logger.debug('3 time = %s' % time) - else: + except: time = "'%s'" % time logger.debug('4 time = %s' % time) return time -- 2.39.5