Jean-Frédéric has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/234494

Change subject: More useful output with source for no primkey error
......................................................................

More useful output with source for no primkey error

If no primary key can be found, this is a big deal:
the monument cannot get added to the database.
We want a more helpful message to be able to fix
the issue.

Change-Id: I351519162f866668ba30170f2b90c276a756468d
---
M erfgoedbot/update_database.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage 
refs/changes/94/234494/1

diff --git a/erfgoedbot/update_database.py b/erfgoedbot/update_database.py
index b3c423e..ee86b94 100755
--- a/erfgoedbot/update_database.py
+++ b/erfgoedbot/update_database.py
@@ -424,7 +424,7 @@
         updateMonument(
             contents, source, countryconfig, conn, cursor, sourcePage)
     else:
-        print "No primkey available"
+        pywikibot.output(u"No primkey available on %s" % title)
     return unknownFields
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/234494
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I351519162f866668ba30170f2b90c276a756468d
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/heritage
Gerrit-Branch: master
Gerrit-Owner: Jean-Frédéric <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to