From: Menno Smits Date: Mon, 3 Jun 2013 23:20:31 +0000 (+0100) Subject: Fixed bone-headed port handling error with interact functionality X-Git-Tag: 0.10~2^2~9 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=9d5ee9096082360003f420c6d5ed61290f7b3e61;p=imapclient.git Fixed bone-headed port handling error with interact functionality When --ssl was passed without --port, port 143 was used, instead of 993! --- 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