jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/401674 )

Change subject: download_dump: Move the file to `scripts`
......................................................................

download_dump: Move the file to `scripts`

As stated in T123885 , the download_dump.py wasn't meant to be a
maintenance script, it should be placed in the `scripts` directory.
Maintenance scripts are used to maintain pywikibot only.

Bug: T184033
Change-Id: I5b36c8c6282904b15613761d556711c2e2afddc3
---
M scripts/README.rst
R scripts/download_dump.py
2 files changed, 5 insertions(+), 4 deletions(-)

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



diff --git a/scripts/README.rst b/scripts/README.rst
index f07b822..7bf070c 100644
--- a/scripts/README.rst
+++ b/scripts/README.rst
@@ -85,6 +85,8 @@
     | djvutext.py            | Extracts OCR text from djvu files and uploads 
onto      |
     |                        | pages in the "Page" namespace on Wikisource.    
        |
     
+------------------------+---------------------------------------------------------+
+    | download_dump.py       | Downloads dumps from dumps.wikimedia.org        
        |
+    
+------------------------+---------------------------------------------------------+
     | editarticle.py         | Edit a Wikipedia article with your favourite 
editor     |
     
+------------------------+---------------------------------------------------------+
     | fixing_redirects.py    | Correct all redirect links of processed pages.  
        |
diff --git a/scripts/maintenance/download_dump.py b/scripts/download_dump.py
similarity index 98%
rename from scripts/maintenance/download_dump.py
rename to scripts/download_dump.py
index ee5539a..01f111d 100644
--- a/scripts/maintenance/download_dump.py
+++ b/scripts/download_dump.py
@@ -20,7 +20,6 @@
 #
 import binascii
 import os.path
-import sys

 from os import remove, replace, symlink, urandom

@@ -33,7 +32,7 @@

     """Download dump bot."""

-    availableOptions = {
+    availableOptions = {  # noqa: N815
         'wikiname': '',
         'filename': '',
         'storepath': './',
@@ -191,7 +190,7 @@

     local_args = pywikibot.handle_args(args)
     for arg in local_args:
-        option, sep, value = arg.partition(':')
+        option, _, value = arg.partition(':')
         if option.startswith('-'):
             option = option[1:]
             if option == 'filename':
@@ -225,4 +224,4 @@


 if __name__ == '__main__':
-    sys.exit(main())
+    main()

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/401674
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I5b36c8c6282904b15613761d556711c2e2afddc3
Gerrit-Change-Number: 401674
Gerrit-PatchSet: 8
Gerrit-Owner: Rafidaslam <[email protected]>
Gerrit-Reviewer: Framawiki <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to