Skip to content

Commit

Permalink
Use str.rsplit() where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
fedordikarev committed Mar 14, 2020
1 parent a29f24f commit 3be0dba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion medrating.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def save_report_to_file(user, completed, uncompleted):
report_name = "{}/{}.txt".format(out_dir, user['username'])
try:
with open(report_name, "r") as f:
prev_date = f.readline().rstrip().split()[-2:]
prev_date = f.readline().rstrip().rsplit(None, 2)[-2:]
except (OSError, IOError) as e:
prev_date = None

Expand Down

0 comments on commit 3be0dba

Please sign in to comment.