From 90136b08b680a90f4962fabf7bf63a9c9a3a1753 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 4 Dec 1997 19:44:30 +0000 Subject: Only parsing requires Python 1.5 --- Tools/world/world | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Tools/world/world b/Tools/world/world index 01ec4c2..e973ade 100755 --- a/Tools/world/world +++ b/Tools/world/world @@ -1,4 +1,4 @@ -#! /usr/bin/env python1.5 +#! /usr/bin/env python """Print the long name of an Internet domain. @@ -51,11 +51,6 @@ __source__ = '' import sys import string import getopt -try: - import re -except ImportError: - print 'Python 1.5 is required!' - sys.exit(1) @@ -81,6 +76,12 @@ def resolve(rawaddr): def parse(file, normalize): try: + import re + except ImportError: + print 'Parsing requires Python 1.5' + sys.exit(1) + + try: fp = open(file) except IOError, (err, msg): print msg, ':', file -- cgit v0.12