Xqt has submitted this change and it was merged.

Change subject: code clean-up:
......................................................................


code clean-up:

- replace "pywikibot.config." with "config."
- remove obsolete "return None"

Change-Id: I3ae79965360f2f4bef4f1a77111d8c5c573db982
---
M category.py
1 file changed, 8 insertions(+), 9 deletions(-)

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



diff --git a/category.py b/category.py
index 7dfa0e5..fb121d0 100644
--- a/category.py
+++ b/category.py
@@ -90,8 +90,8 @@
 # (C) leogregianin, 2004-2008
 # (C) Cyde, 2006-2010
 # (C) Anreas J Schwab, 2007
-# (C) xqt, 2009-2012
-# (C) Pywikipedia team, 2008-2012
+# (C) xqt, 2009-2013
+# (C) Pywikipedia team, 2008-2013
 #
 __version__ = '$Id$'
 #
@@ -140,10 +140,10 @@
         else:
             try:
                 if not os.path.isabs(filename):
-                    filename = pywikibot.config.datafilepath(filename)
+                    filename = config.datafilepath(filename)
                 f = bz2.BZ2File(filename, 'r')
                 pywikibot.output(u'Reading dump from %s'
-                                 % pywikibot.config.shortpath(filename))
+                                 % config.shortpath(filename))
                 databases = pickle.load(f)
                 f.close()
                 # keys are categories, values are 2-tuples with lists as
@@ -208,10 +208,10 @@
 
         '''
         if not os.path.isabs(filename):
-            filename = pywikibot.config.datafilepath(filename)
+            filename = config.datafilepath(filename)
         if self.catContentDB or self.superclassDB:
             pywikibot.output(u'Dumping to %s, please wait...'
-                             % pywikibot.config.shortpath(filename))
+                             % config.shortpath(filename))
             f = bz2.BZ2File(filename, 'w')
             databases = {
                 'catContentDB': self.catContentDB,
@@ -230,7 +230,7 @@
                 pass
             else:
                 pywikibot.output(u'Database is empty. %s removed'
-                                 % pywikibot.config.shortpath(filename))
+                                 % config.shortpath(filename))
 
 
 class AddCategory:
@@ -319,7 +319,6 @@
                                  redirTarget.title(asLink=True)))
         else:
             return text
-        return None
 
     def save(self, text, page, comment, minorEdit=True, botflag=True):
         # only save if something was changed
@@ -838,7 +837,7 @@
         self.catTitle = catTitle
         self.catDB = catDB
         if filename and not os.path.isabs(filename):
-            filename = pywikibot.config.datafilepath(filename)
+            filename = config.datafilepath(filename)
         self.filename = filename
         # TODO: make maxDepth changeable with a parameter or config file entry
         self.maxDepth = maxDepth

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3ae79965360f2f4bef4f1a77111d8c5c573db982
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Xqt <[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