minore code cleanup

This commit is contained in:
Babak Farrokhi 2016-02-04 12:15:21 +03:30
parent e155625401
commit fdc300eb8d

View File

@ -72,7 +72,6 @@ def main():
# print help information and exit:
print(err) # will print something like "option -a not recognized"
usage()
exit(2)
if args and len(args) == 1:
hostname = args[0]
@ -96,11 +95,7 @@ def main():
elif o in ("-t", "--type"):
dnsrecord = a
else:
if a.startswith('-'):
print("unknown syntax: %s" % a)
usage()
else:
hostname = a
usage()
resolver = dns.resolver.Resolver()
resolver.nameservers=[dnsserver]
@ -161,3 +156,4 @@ def main():
if __name__ == '__main__':
main()