view roundup/anypy/ssl_.py @ 7076:d3d20e145cea

bug: cleaner error message on OptionUnsetError in initialize We got a scary traceback when a: roundup.configuration.OptionUnsetError exception was raised during tracker.init(). Capture the exception and raise a UsageError that is printed more cleanly. It now reads: Error: In tracker/config.ini - MAIL_DOMAIN is not set and has no default
author John Rouillard <rouilj@ieee.org>
date Thu, 24 Nov 2022 20:57:17 -0500
parents 3e8f2104753b
children 07ce4e4110f5
line wrap: on
line source

try:
    # Python 3+
    from ssl import SSLError
except (ImportError, AttributeError):
    # Python 2.5-2.7
    from socket import sslerror as SSLError

Roundup Issue Tracker: http://roundup-tracker.org/