jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/343044 )
Change subject: djvu.py: Use pywikibot.tools.Counter instead of collections.Counter
......................................................................
djvu.py: Use pywikibot.tools.Counter instead of collections.Counter
collections.Counter is not available in Python 2.6.
Bug: T160620
Change-Id: I49ca4ce355d3f1677f9fb4e98877b9e293c68eb9
---
M pywikibot/tools/djvu.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/pywikibot/tools/djvu.py b/pywikibot/tools/djvu.py
index 1eee4e3..2355a45 100644
--- a/pywikibot/tools/djvu.py
+++ b/pywikibot/tools/djvu.py
@@ -10,7 +10,6 @@
__version__ = '$Id$'
-import collections
import os
import re
import subprocess
@@ -18,6 +17,7 @@
import pywikibot
from pywikibot.tools import (
+ Counter,
deprecated, deprecated_args,
StringTypes,
)
@@ -195,7 +195,7 @@
def get_most_common_info(self):
"""Return most common size and dpi for pages in djvu
file."""
- cnt = collections.Counter(s_d for _, s_d in self._get_page_info().values())
+ cnt = Counter(s_d for _, s_d in self._get_page_info().values())
(size, dpi), _ = cnt.most_common()[0]
return size, dpi
--
To view, visit
https://gerrit.wikimedia.org/r/343044
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I49ca4ce355d3f1677f9fb4e98877b9e293c68eb9
Gerrit-PatchSet: 8
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>