jenkins-bot has submitted this change and it was merged.

Change subject: bot: move debug helpers to the Bot class
......................................................................


bot: move debug helpers to the Bot class

Change-Id: I90eafe6f1eb4ca532651d88302d3ec34b18e995b
Signed-off-by: Loic Dachary <l...@dachary.org>
---
M FLOSSbot/bot.py
M FLOSSbot/repository.py
2 files changed, 12 insertions(+), 12 deletions(-)

Approvals:
  Dachary: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/FLOSSbot/bot.py b/FLOSSbot/bot.py
index a58920f..6719396 100644
--- a/FLOSSbot/bot.py
+++ b/FLOSSbot/bot.py
@@ -36,6 +36,18 @@
                                                 fam="wikidata")
         self.reset_cache()
 
+    def debug(self, item, message):
+        self.log(log.debug, item, message)
+
+    def info(self, item, message):
+        self.log(log.info, item, message)
+
+    def error(self, item, message):
+        self.log(log.error, item, message)
+
+    def log(self, fun, item, message):
+        fun("http://wikidata.org/wiki/"; + item.getID() + " " + message)
+
     def reset_cache(self):
         self.entities = {
             'property': {},
diff --git a/FLOSSbot/repository.py b/FLOSSbot/repository.py
index 49ad37d..428d915 100644
--- a/FLOSSbot/repository.py
+++ b/FLOSSbot/repository.py
@@ -154,18 +154,6 @@
     def factory(argv):
         return Repository(Repository.get_parser().parse_args(argv))
 
-    def debug(self, item, message):
-        self.log(log.debug, item, message)
-
-    def info(self, item, message):
-        self.log(log.info, item, message)
-
-    def error(self, item, message):
-        self.log(log.error, item, message)
-
-    def log(self, fun, item, message):
-        fun("http://wikidata.org/wiki/"; + item.getID() + " " + message)
-
     def run(self):
         if len(self.args.item) > 0:
             self.run_items()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I90eafe6f1eb4ca532651d88302d3ec34b18e995b
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/bots/FLOSSbot
Gerrit-Branch: master
Gerrit-Owner: Dachary <l...@dachary.org>
Gerrit-Reviewer: Dachary <l...@dachary.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to