Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/132790

Change subject: Add nocreate parameter to Site.editpage
......................................................................

Add nocreate parameter to Site.editpage

Change-Id: I2b1965fd931ecfcd194a3deac30c32801daa7935
---
M pywikibot/site.py
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/90/132790/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index 583df32..cf48768 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -2660,7 +2660,8 @@
 
     @must_be(group='user')
     def editpage(self, page, summary, minor=True, notminor=False,
-                 bot=True, recreate=True, createonly=False, watch=None):
+                 bot=True, recreate=True, createonly=False, nocreate=False,
+                 watch=None):
         """Submit an edited Page object to be saved to the wiki.
 
         @param page: The Page to be saved; its .text property will be used
@@ -2673,6 +2674,7 @@
             title has previously been deleted
         @param createonly: if True, raise an error if this title already
             exists on the wiki
+        @param nocreate: if True, raise an error if the page does not exist
         @param watch: Specify how the watchlist is affected by this edit, set
             to one of "watch", "unwatch", "preferences", "nochange":
             * watch: add the page to the watchlist
@@ -2720,6 +2722,8 @@
             params['recreate'] = ""
         if createonly:
             params['createonly'] = ""
+        if nocreate:
+            params['nocreate'] = ""
         if watch in ["watch", "unwatch", "preferences", "nochange"]:
             params['watchlist'] = watch
         elif watch:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b1965fd931ecfcd194a3deac30c32801daa7935
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>

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

Reply via email to