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

Don't crash on null edit

Null edits won't include 'newtimestamp' in the response
parent 1e85766e
No related branches found
No related tags found
No related merge requests found
...@@ -202,7 +202,9 @@ class Page(object): ...@@ -202,7 +202,9 @@ class Page(object):
self.handle_edit_error(e, summary) self.handle_edit_error(e, summary)
if result['edit'].get('result') == 'Success': if result['edit'].get('result') == 'Success':
self.last_rev_time = client.parse_timestamp(result['edit'].get('newtimestamp')) lrt = result['edit'].get('newtimestamp')
if lrt: # It's not included if no change was made
self.last_rev_time = client.parse_timestamp(lrt)
return result['edit'] return result['edit']
def handle_edit_error(self, e, summary): def handle_edit_error(self, e, summary):
......
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