From 9d5ee9096082360003f420c6d5ed61290f7b3e61 Mon Sep 17 00:00:00 2001 From: Menno Smits Date: Tue, 4 Jun 2013 00:20:31 +0100 Subject: [PATCH] Fixed bone-headed port handling error with interact functionality When --ssl was passed without --port, port 143 was used, instead of 993! --- imapclient/interact.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/imapclient/interact.py b/imapclient/interact.py index 9964e27..a284798 100644 --- a/imapclient/interact.py +++ b/imapclient/interact.py @@ -21,7 +21,8 @@ def command_line(): p.add_option('-p', '--password', dest='password', action='store', help='Password to login with') p.add_option('-P', '--port', dest='port', action='store', type=int, - default=None, help='IMAP port to use (default is 143)') + default=None, + help='IMAP port to use (default is 143, or 993 for SSL)') p.add_option('-s', '--ssl', dest='ssl', action='store_true', default=False, help='Use SSL connection') p.add_option('-f', '--file', dest='file', action='store', default=None, @@ -41,8 +42,6 @@ def command_line(): for opt_name in ('host', 'username', 'password'): if not getattr(opts, opt_name): setattr(opts, opt_name, getpass(opt_name + ': ')) - if not opts.port: - opts.port = 143 # Options not supported on the command line opts.oauth = False opts.oauth2 = False -- 2.43.0