-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
Description
This is from the 0.2 release. Looks like the journal['last_comment_meta'] field occasionally comes back None, which blows up backup.py.
Traceback (most recent call last):
File "./src/myarchive/main.py", line 156, in <module>
main()
File "./src/myarchive/main.py", line 146, in main
ljapi.download_journals_and_comments()
File "/mnt/bulk/repos/projects/myarchive/src/myarchive/ljlib.py", line 39, in download_journals_and_comments
nc = update_journal_comments(server=self._server, journal=self.journal)
File "/usr/local/lib/python2.7/dist-packages/lj/backup.py", line 148, in update_journal_comments
if len(journal['comments']) == 0 or days_ago(journal['last_comment_meta']) > 30:
File "/usr/local/lib/python2.7/dist-packages/lj/backup.py", line 61, in days_ago
return (datetime.datetime.today() - datetime_from_string(s)).days
File "/usr/local/lib/python2.7/dist-packages/lj/backup.py", line 57, in datetime_from_string
return datetime.datetime.strptime(s, "%Y-%m-%d %H:%M:%S")
TypeError: must be string, not None
Reactions are currently unavailable