be robust against running lxc containers without a timestamp
Thierry Parmentelat [Tue, 25 Jun 2013 06:49:16 +0000 (08:49 +0200)]
system/Substrate.py

index 773e750..ff77940 100644 (file)
@@ -634,7 +634,8 @@ class PlcLxcBox (PlcBox):
            pid=lxc_line.split(";")[1]
            timestamp=lxc_line.split(";")[2]
             self.add_lxc(lxcname,pid)
-            timestamp=int(timestamp)
+            try: timestamp=int(timestamp)
+            except: timestamp=0
             p=self.plc_instance_by_lxcname(lxcname)
             if not p:
                 print 'WARNING zombie plc',self.hostname,lxcname