Fix repeated version notifications
Without this fix the file with the list of notifications looks like this: ``` 0.19.0,1601899026.4373078,<built-in method count of Notification object at 0x7f8c582193b0> ``` which ends up notifying about a new version all the time.
This commit is contained in:
parent
8cd51386cb
commit
f149b74332
@ -90,7 +90,9 @@ def save_notification(version: Version) -> None:
|
|||||||
for version in sorted(notified_versions):
|
for version in sorted(notified_versions):
|
||||||
n = notified_versions[version]
|
n = notified_versions[version]
|
||||||
lines.append('{},{},{}'.format(
|
lines.append('{},{},{}'.format(
|
||||||
'.'.join(map(str, n.version)), n.time_of_last_notification, n.count))
|
'.'.join(map(str, n.version)),
|
||||||
|
n.time_of_last_notification,
|
||||||
|
n.notification_count))
|
||||||
atomic_save('\n'.join(lines).encode('utf-8'), version_notification_log())
|
atomic_save('\n'.join(lines).encode('utf-8'), version_notification_log())
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user