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

Change subject: Use pywikibot.logging.error
......................................................................


Use pywikibot.logging.error

Replaces pywikibot.error with the same method in new logging layer.
pywikibot.tools should not import from the top level of pywikibot
so that the tools subpackage is only dependent on the logging layer.

Change-Id: I088bc3dd001dc8555c90268edb4c2b056d40e30d
---
M pywikibot/tools/djvu.py
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/pywikibot/tools/djvu.py b/pywikibot/tools/djvu.py
index 6fb23cc..e659a43 100644
--- a/pywikibot/tools/djvu.py
+++ b/pywikibot/tools/djvu.py
@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 """Wrapper around djvulibre to access djvu files properties and content."""
 #
-# (C) Pywikibot team, 2015
+# (C) Pywikibot team, 2015-2016
 #
 # Distributed under the terms of the MIT license.
 #
@@ -13,7 +13,7 @@
 import os.path
 import subprocess
 
-import pywikibot
+from pywikibot.logging import error
 
 
 class DjVuFile(object):
@@ -47,7 +47,7 @@
                                   stdout=subprocess.PIPE, 
stderr=subprocess.PIPE)
             (stdoutdata, stderrdata) = dp.communicate()
             if dp.returncode != 0:
-                pywikibot.error('djvulibre library error!\n%s' % stderrdata)
+                error('djvulibre library error!\n%s' % stderrdata)
             self._image_count = int(stdoutdata)
         return self._image_count
 
@@ -58,7 +58,7 @@
                                   stdout=subprocess.PIPE, 
stderr=subprocess.PIPE)
             (stdoutdata, stderrdata) = dp.communicate()
             if dp.returncode != 0:
-                pywikibot.error('djvulibre library error!\n%s' % stderrdata)
+                error('djvulibre library error!\n%s' % stderrdata)
             txt = stdoutdata.decode('utf-8')
             self._has_text = 'TXTz' in txt
         return self._has_text
@@ -91,5 +91,5 @@
                               stdout=subprocess.PIPE, stderr=subprocess.PIPE)
         (stdoutdata, stderrdata) = dp.communicate()
         if dp.returncode != 0:
-            pywikibot.error('djvulibre library error!\n%s' % stderrdata)
+            error('djvulibre library error!\n%s' % stderrdata)
         return self._remove_control_chars(stdoutdata)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I088bc3dd001dc8555c90268edb4c2b056d40e30d
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to