diff options
author | Nikolaus Schulz <microschulz@web.de> | 2006-10-14 23:22:25 +0000 |
---|---|---|
committer | Nikolaus Schulz <microschulz@web.de> | 2006-10-14 23:22:25 +0000 |
commit | f4c6017d32cf01a0f27a705f5ed2d4e9c4ee98d0 (patch) | |
tree | b81c5a5f3adc1e2d483e2ae69c684bb0252e684b | |
parent | ae5e5f63a149b6b8c0152e68d80d2755f4890514 (diff) | |
download | archivemail-f4c6017d32cf01a0f27a705f5ed2d4e9c4ee98d0.tar.gz archivemail-f4c6017d32cf01a0f27a705f5ed2d4e9c4ee98d0.tar.bz2 archivemail-f4c6017d32cf01a0f27a705f5ed2d4e9c4ee98d0.zip |
IMAPS and IMAP4.login_cram_md5() are new in Python 2.3; bump Python dependency
check to version 2.3.
-rwxr-xr-x | archivemail.py | 10 |
1 files changed, 6 insertions, 4 deletions
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 |