[PATCH] Don't strip whitespace in the -f option

Sebastian Spaeth Sebastian at SSpaeth.de
Thu Apr 28 14:26:07 BST 2011


From: Dan Christensen <jdc at uwo.ca>

Allow leading and trailing spaces in folder names specified on the
command line.

Reviewed-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
Signed-off-by: Dan Christensen <jdc at uwo.ca>
---
No need to get touchy on a non-issue anyone :-). Here is the patch as 
authored by Dan. I just added a Changelog entry. I appreciate that 
people are thinking about the current and intended behavior of offlineimap.

Patch based on master.

 Changelog.draft.rst |    3 +++
 offlineimap/init.py |    3 +--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Changelog.draft.rst b/Changelog.draft.rst
index 0a85888..d0125b7 100644
--- a/Changelog.draft.rst
+++ b/Changelog.draft.rst
@@ -16,6 +16,9 @@ New Features
 Changes
 -------
 
+- no whitespace is stripped from comma-separated arguments passed via
+  the -f option.
+
 Bug Fixes
 ---------
 
diff --git a/offlineimap/init.py b/offlineimap/init.py
index 296b84b..84983a4 100644
--- a/offlineimap/init.py
+++ b/offlineimap/init.py
@@ -240,8 +240,7 @@ class OfflineImap:
 
         #custom folder list specified?
         if options.folders:
-            foldernames = map(lambda s: s.strip(),
-                              options.folders.split(","))
+            foldernames = options.folders.split(",")
             folderfilter = "lambda f: f in %s" % foldernames
             folderincludes = "[]"
             for accountname in accounts.getaccountlist(config):
-- 
1.7.4.1





More information about the OfflineIMAP-project mailing list