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