diff --git a/BUGS b/BUGS index c385fab..5a7c52e 100644 --- a/BUGS +++ b/BUGS @@ -1,6 +1,8 @@ Open bugs: -- optparse only included with python 2.3. Make sure installer detects. - Find out if a record is modifiable, otherwise return info. CNAME and A records. Fixed bugs +- optparse only included with python 2.3. Make sure installer detects. + Solution: + from optik import OptionParser diff --git a/dnsupdate.py b/dnsupdate.py index 00611cc..d122549 100644 --- a/dnsupdate.py +++ b/dnsupdate.py @@ -35,7 +35,12 @@ def get_ipaddress(): def getparams(msg): # Read command line parameters and input values - from optparse import OptionParser + # OptionParser is part of Python 2.3 and called optik if installed under + # Python 2.x + try: + from optparse import OptionParser + except: + from optik import OptionParser usage = "usage: %prog [OPTIONS]" parser = OptionParser(usage) parser.add_option("-c", "--config",