aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/mailsync15
1 files changed, 10 insertions, 5 deletions
diff --git a/bin/mailsync b/bin/mailsync
index bc83a79..97a89b4 100755
--- a/bin/mailsync
+++ b/bin/mailsync
@@ -1,3 +1,3 @@
#! /usr/bin/python
-# Copyright (C) 2014-2015 Sergey Poznyakoff
+# Copyright (C) 2014-2023 Sergey Poznyakoff
#
@@ -28,4 +28,4 @@ from subprocess import Popen,PIPE,call
dbg = 0
-dry_run = 0
-reset_state = 0
+dry_run = False
+reset_state = False
@@ -126,2 +126,3 @@ def mboxtohtml(listid):
t = 0
+ reset_map = {}
for message in inbox.values()[n:]:
@@ -135,2 +136,6 @@ def mboxtohtml(listid):
os.makedirs(dirname, 02775)
+ reset_map[period] = True
+ elif reset_state and not period in reset_map:
+ os.remove(dirname + '/.mhonarc.db')
+ reset_map[period] = True
@@ -280,5 +285,5 @@ if __name__ == '__main__':
elif o in ("-n", "--dry-run"):
- dry_run = 1
+ dry_run = True
elif o in ("-r", "--reset"):
- reset_state = 1
+ reset_state = True

Return to:

Send suggestions and report system problems to the System administrator.