From f4c6017d32cf01a0f27a705f5ed2d4e9c4ee98d0 Mon Sep 17 00:00:00 2001 From: Nikolaus Schulz Date: Sat, 14 Oct 2006 23:22:25 +0000 Subject: IMAPS and IMAP4.login_cram_md5() are new in Python 2.3; bump Python dependency check to version 2.3. --- archivemail.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'archivemail.py') diff --git a/archivemail.py b/archivemail.py index e7c05cc..4341d53 100755 --- a/archivemail.py +++ b/archivemail.py @@ -36,19 +36,21 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.""" import sys def check_python_version(): - """Abort if we are running on python < v2.0""" - too_old_error = "This program requires python v2.0 or greater. " + \ + """Abort if we are running on python < v2.3""" + too_old_error = "This program requires python v2.3 or greater. " + \ "Your version of python is:\n%s""" % sys.version try: version = sys.version_info # we might not even have this function! :) - if (version[0] < 2): + if (version[0] < 2) or (version[0] == 2 and version[1] < 3): print too_old_error sys.exit(1) except AttributeError: print too_old_error sys.exit(1) -check_python_version() # define & run this early because 'atexit' is new +# define & run this early because 'atexit' requires Python >= 2.0 +# (IMAP over SSL requires Python >= 2.3) +check_python_version() import atexit import fcntl -- cgit v1.2.3