summaryrefslogtreecommitdiffstats
path: root/pykolab/imap/cyrus.py
diff options
context:
space:
mode:
Diffstat (limited to 'pykolab/imap/cyrus.py')
-rw-r--r--pykolab/imap/cyrus.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/pykolab/imap/cyrus.py b/pykolab/imap/cyrus.py
index 6034b48..ae90fd6 100644
--- a/pykolab/imap/cyrus.py
+++ b/pykolab/imap/cyrus.py
@@ -18,6 +18,7 @@
#
import cyruslib
+import sys
import time
from urlparse import urlparse
@@ -323,10 +324,16 @@ class Cyrus(cyruslib.CYRUS):
target_server = self.find_mailfolder_server(target_folder)
- if not target_server == self.server:
- self.xfer(undelete_folder,target_server)
+ if hasattr(conf,'dry_run') and not conf.dry_run:
+ if not target_server == self.server:
+ self.xfer(undelete_folder,target_server)
- self.rename(undelete_folder,target_folder)
+ self.rename(undelete_folder,target_folder)
+ else:
+ if not target_server == self.server:
+ print >> sys.stdout, _("Would have transfered %s from %s to %s") % (undelete_folder, self.server, target_server)
+
+ print >> sys.stdout, _("Would have renamed %s to %s") % (undelete_folder, target_folder)
def parse_mailfolder(self, mailfolder):
"""