raise ImportError when Python version is wrong instead of AssertionError

This commit is contained in:
Michael Farrell 2012-08-07 14:19:15 +09:30
parent fed8461e4b
commit a78f0a6b29

View file

@ -13,7 +13,7 @@ import sys
# Make sure that this is at least Python 2.3 # Make sure that this is at least Python 2.3
required_version = (2, 3) required_version = (2, 3)
if sys.version_info < required_version: if sys.version_info < required_version:
raise AssertionError, "Requires at least Python 2.3" raise ImportError, "Requires at least Python 2.3"
from tftpy.TftpShared import * from tftpy.TftpShared import *
from tftpy.TftpPacketTypes import * from tftpy.TftpPacketTypes import *