[sources/native] do not let a log message crash on us stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Fri, 27 Apr 2012 15:09:27 +0200
branchstable
changeset 8379 1a3746ec4d65
parent 8377 a9a7ae11dfb0
child 8380 b752df3e8596
[sources/native] do not let a log message crash on us
server/sources/native.py
--- a/server/sources/native.py	Fri Apr 27 14:10:04 2012 +0200
+++ b/server/sources/native.py	Fri Apr 27 15:09:27 2012 +0200
@@ -1775,8 +1775,10 @@
         versions = set(self._get_versions())
         if file_versions != versions:
             self.logger.critical('Unable to restore : versions do not match')
-            self.logger.critical('Expected:\n%s', '\n'.join(list(sorted(versions))))
-            self.logger.critical('Found:\n%s', '\n'.join(list(sorted(file_versions))))
+            self.logger.critical('Expected:\n%s', '\n'.join('%s : %s' % (cube, ver)
+                                                            for cube, ver in sorted(versions)))
+            self.logger.critical('Found:\n%s', '\n'.join('%s : %s' % (cube, ver)
+                                                         for cube, ver in sorted(file_versions)))
             raise ValueError('Unable to restore : versions do not match')
         table_chunks = {}
         for name in archive.namelist():