]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
fixup
authorHolger Levsen <holger@layer-acht.org>
Fri, 12 Oct 2012 16:17:29 +0000 (18:17 +0200)
committerHolger Levsen <holger@layer-acht.org>
Fri, 12 Oct 2012 16:17:29 +0000 (18:17 +0200)
db_add.py

index df56f066de9b66d6bf2cd4f2fd2da595aa431198..b3e8e96ecfbd91e8c31978937f876563214bfc93 100755 (executable)
--- 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