Merge 6a8926219d
into 6b51d4ed49
This commit is contained in:
commit
4007caf96a
|
@ -85,6 +85,14 @@ Allows one to specify a particular account or set of accounts to sync without
|
|||
having to edit the config file.
|
||||
|
||||
|
||||
-A <account1[,account2[,...]]>::
|
||||
|
||||
Skips the listed accounts, even if they are in the config file.
|
||||
+
|
||||
Allows one to specify a particular account or set of accounts to skip sync
|
||||
without having to edit the config file.
|
||||
|
||||
|
||||
-c <path/to/configuration_file>::
|
||||
|
||||
Specifies a configuration file to use.
|
||||
|
|
|
@ -134,6 +134,10 @@ class OfflineImap(object):
|
|||
metavar="account1[,account2[,...]]",
|
||||
help="list of accounts to sync")
|
||||
|
||||
parser.add_option("-A", dest="skipaccounts",
|
||||
metavar="account1[,account2[,...]]",
|
||||
help="list of accounts to skip")
|
||||
|
||||
parser.add_option("-c", dest="configfile", metavar="FILE",
|
||||
default=None,
|
||||
help="specifies a configuration file to use")
|
||||
|
@ -399,6 +403,8 @@ class OfflineImap(object):
|
|||
if options.accounts:
|
||||
activeaccountnames = options.accounts
|
||||
activeaccountnames = [x.lstrip() for x in activeaccountnames.split(",")]
|
||||
if options.skipaccounts:
|
||||
activeaccountnames = [x for x in activeaccountnames if x not in options.skipaccounts]
|
||||
|
||||
allaccounts = accounts.getaccountlist(self.config)
|
||||
for accountname in activeaccountnames:
|
||||
|
|
Loading…
Reference in New Issue