From 27dabb45282911e375336f75934af9dd6cc5d963 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 30 Jul 2015 16:49:29 +0200 Subject: Modernize 'except' clauses The 'as' syntax works from Python 2 on, and Python 3 will drop the "comma" syntax. Reviewed-By: Tomas Babej --- ipapython/dnsutil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipapython/dnsutil.py') diff --git a/ipapython/dnsutil.py b/ipapython/dnsutil.py index f08cddad9..228cb6629 100644 --- a/ipapython/dnsutil.py +++ b/ipapython/dnsutil.py @@ -37,7 +37,7 @@ class DNSName(dns.name.Name): labels = labels.labels super(DNSName, self).__init__(labels) - except UnicodeError, e: + except UnicodeError as e: # dnspython bug, an invalid domain name returns the UnicodeError # instead of a dns.exception raise dns.exception.SyntaxError(e) -- cgit