Awight has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/404987 )
Change subject: Tolerate empty tables
......................................................................
Tolerate empty tables
This is an edge case encountered in empty or new-ish wikis.
Change-Id: Ibd97ea1086030fe5753abf9fbe28511026669384
---
M xmldumps-backup/dumps/utils.py
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/dumps
refs/changes/87/404987/1
diff --git a/xmldumps-backup/dumps/utils.py b/xmldumps-backup/dumps/utils.py
index 86d285e..830b1ee 100644
--- a/xmldumps-backup/dumps/utils.py
+++ b/xmldumps-backup/dumps/utils.py
@@ -482,7 +482,7 @@
return 1
lines = results.splitlines()
- if lines and lines[1]:
+ if lines and lines[1] and lines[1] != 'NULL':
self.total_pages = int(lines[1])
query = "select MAX(rev_id) from %srevision;" %
self.db_server_info.db_table_prefix
@@ -497,7 +497,7 @@
return 1
lines = results.splitlines()
- if lines and lines[1]:
+ if lines and lines[1] and lines[1] != 'NULL':
self.total_edits = int(lines[1])
query = "select MAX(log_id) from %slogging;" %
self.db_server_info.db_table_prefix
@@ -512,7 +512,7 @@
return 1
lines = results.splitlines()
- if lines and lines[1]:
+ if lines and lines[1] and lines[1] != 'NULL':
self.total_logitems = int(lines[1])
return 0
--
To view, visit https://gerrit.wikimedia.org/r/404987
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd97ea1086030fe5753abf9fbe28511026669384
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits