From a78f0a6b2968a86e5aadf48a5b3df3cf729c9622 Mon Sep 17 00:00:00 2001 From: Michael Farrell Date: Tue, 7 Aug 2012 14:19:15 +0930 Subject: [PATCH] raise ImportError when Python version is wrong instead of AssertionError --- tftpy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tftpy/__init__.py b/tftpy/__init__.py index 9149761..fba9a9f 100644 --- a/tftpy/__init__.py +++ b/tftpy/__init__.py @@ -13,7 +13,7 @@ import sys # Make sure that this is at least Python 2.3 required_version = (2, 3) 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.TftpPacketTypes import *