diff options
author | Michael Farrell <micolous+git@gmail.com> | 2012-08-07 14:10:37 +0930 |
---|---|---|
committer | Michael Farrell <micolous+git@gmail.com> | 2012-08-07 14:10:37 +0930 |
commit | fed8461e4bff9bb90abfd850676b4078a8dcf4cb (patch) | |
tree | bc784444954e48156834ac8765c6edbbbc7dcc22 | |
parent | e8039dd715242d6830ff1005085fec5bb89b300c (diff) | |
download | tftpy-fed8461e4bff9bb90abfd850676b4078a8dcf4cb.tar.gz |
Improved version check so it is much cleaner, fix relative import issue with Python 2.5 not working
-rw-r--r-- | tftpy/__init__.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tftpy/__init__.py b/tftpy/__init__.py index 3060ed6..9149761 100644 --- a/tftpy/__init__.py +++ b/tftpy/__init__.py @@ -11,14 +11,15 @@ directly. The TftpClient and TftpServer classes can be reached through it. import sys # Make sure that this is at least Python 2.3 -verlist = sys.version_info -if not (verlist[0] > 2 or (verlist[0] == 2 and verlist[1] >= 3)): +required_version = (2, 3) +if sys.version_info < required_version: raise AssertionError, "Requires at least Python 2.3" -from TftpShared import * -from TftpPacketTypes import * -from TftpPacketFactory import * -from TftpClient import * -from TftpServer import * -from TftpContexts import * -from TftpStates import * +from tftpy.TftpShared import * +from tftpy.TftpPacketTypes import * +from tftpy.TftpPacketFactory import * +from tftpy.TftpClient import * +from tftpy.TftpServer import * +from tftpy.TftpContexts import * +from tftpy.TftpStates import * + |