scripts/data_maintainer.py: fixed to survive null in stats column of sql_modify
authormartinko <gamato@users.sf.net>
Tue, 18 Feb 2014 13:52:20 +0000 (14:52 +0100)
committermartinko <gamato@users.sf.net>
Tue, 18 Feb 2014 13:52:20 +0000 (14:52 +0100)
scripts/data_maintainer.py

index de550c37d3e203139203a6d7b3a0cdeeae19a232..e59b99c222c0e67d865be741750225d344386727 100755 (executable)
@@ -292,7 +292,7 @@ class DataMaintainer (skytools.DBScript):
                     mres = mcur.fetchall()
                     for r in mres:
                         if 'stats' in r: # if specially handled column 'stats' is present
-                            for k, v in skytools.db_urldecode(r['stats']).items():
+                            for k, v in skytools.db_urldecode(r['stats'] or '').items():
                                 self.stat_increase(k, int(v))
                         self.log.debug(r)
                 else: