Make analog.py cope with another date/time format.
authorCarl Hetherington <cth@carlh.net>
Fri, 11 Dec 2015 10:27:02 +0000 (10:27 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 11 Dec 2015 10:27:02 +0000 (10:27 +0000)
hacks/analog.py

index 51d8a96390577638a36e36c447d997041b4247bb..d14004c1524c33d7a0508cd03726c61c38465544 100644 (file)
@@ -109,7 +109,10 @@ while True:
     else:
         # Date/time timestamp: other LOG_*
         s = find_nth(l, ':', 3)
-        T = Time(time.mktime(time.strptime(l[:s])))
+        try:
+            T = Time(time.mktime(time.strptime(l[:s])))
+        except:
+            T = Time(time.mktime(time.strptime(l[:s], "%d.%m.%Y %H:%M:%S")))
         message = l[s+2:]
 
     # T is elapsed time since the first log message