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

[#57] Simplify code

parent bd7bc3b5
No related branches found
No related tags found
No related merge requests found
......@@ -201,10 +201,9 @@ class Page(object):
else:
self.handle_edit_error(e, summary)
if result['edit'].get('result') == 'Success':
lrt = result['edit'].get('newtimestamp')
if lrt: # It's not included if no change was made
self.last_rev_time = client.parse_timestamp(lrt)
# 'newtimestamp' is not included if no change was made
if 'newtimestamp' in result['edit'].keys():
self.last_rev_time = client.parse_timestamp(result['edit'].get('newtimestamp'))
return result['edit']
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