Skip to content
Snippets Groups Projects
Unverified Commit e9b70951 authored by Dan Michael O. Heggø's avatar Dan Michael O. Heggø
Browse files

Add workaround for phab:T211233

The post edit cookies makes no sense for bots, but it seems like the PR
for https://phabricator.wikimedia.org/T211233 is not going to be merged,
so we have to work around it.

Closes #221
parent 0e0d85aa
No related branches found
No related tags found
No related merge requests found
......@@ -226,6 +226,11 @@ class Page(object):
if 'newtimestamp' in result['edit'].keys():
self.last_rev_time = parse_timestamp(result['edit'].get('newtimestamp'))
# Workaround for https://phabricator.wikimedia.org/T211233
for cookie in self.site.connection.cookies:
if 'PostEditRevision' in cookie.name:
self.site.connection.cookies.clear(cookie.domain, cookie.path, cookie.name)
# clear the page text cache
self._textcache = {}
return result['edit']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment