Skip to content

Instantly share code, notes, and snippets.

@VcamX
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VcamX/f26066fd09a992cbce6e to your computer and use it in GitHub Desktop.
Save VcamX/f26066fd09a992cbce6e to your computer and use it in GitHub Desktop.
Bug reproduction for T57140
#
# Case 0
# ==============================================
# user-config.py:
#
# family = 'local'
# mylang = 'en'
# usernames['local']['en'] = u'VcamX'
# sysopnames['local']['en'] = u'VcamX'
# password_file = 'password'
#
# password:
#
# (u'VcamX', '123')
#
# Result:
#
# (diff | hist) . . Nb Test 2‎; 01:40 . . (+6)‎ . . ‎VcamX (Talk | contribs | block)‎ (Pywikibot v.2)
# (Deletion log); 01:40 . . VcamX (Talk | contribs | block) deleted page Test 0 ‎(Just delete it)
# (diff | hist) . . Nb Test 1‎; 01:40 . . (+6)‎ . . ‎VcamX (Talk | contribs | block)‎ (Pywikibot v.2)
#
#
# Case 1
# ==============================================
# user-config.py:
#
# family = 'local'
# mylang = 'en'
# usernames['local']['en'] = u'VcamXBot'
# sysopnames['local']['en'] = u'VcamX'
# password_file = 'password'
#
# password:
#
# (u'VcamXBot', '123')
# (u'VcamX', '123')
#
# Result:
#
# (diff | hist) . . Nb Test 2‎; 01:51 . . (+6)‎ . . ‎VcamXBot (Talk | contribs | block)‎ (Pywikibot v.2)
# (Deletion log); 01:51 . . VcamX (Talk | contribs | block) deleted page Test 0 ‎(Just delete it)
# (diff | hist) . . Nb Test 1‎; 01:50 . . (+6)‎ . . ‎VcamXBot (Talk | contribs | block)‎ (Pywikibot v.2)
#
site = pywikibot.Site()
# The action below should be done with non-sysop account (thus bot flag added)
create_page = pywikibot.Page(pywikibot.Link('Test 0'), site)
create_page.text = 'Test 0'
create_page.save()
# The action below should be done with non-sysop account (thus bot flag added)
create_page = pywikibot.Page(pywikibot.Link('Test 1'), site)
create_page.text = 'Test 1'
create_page.save()
# The action below should be done with sysop account (thus no bot flag)
delete_page = pywikibot.Page(pywikibot.Link('Test 0'), site)
delete_page.delete('Just delete it')
# The actionn below should be done with non-sysop account (thus bot flag added)
create_page = pywikibot.Page(pywikibot.Link('Test 2'), site)
create_page.text = 'Test 2'
create_page.save()
@jayvdb
Copy link

jayvdb commented Feb 20, 2015

The action on line 65 should be non-sysop account, with bot flag.
i.e. non-sysop account should continue to behave the same as it did previously, before line 60 caused a sysop action.

@VcamX
Copy link
Author

VcamX commented Feb 21, 2015

@jayvdb I'm sorry, it's a typo actually. Everything seemed to work well according to this script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment