mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Modernize 'except' clauses
The 'as' syntax works from Python 2 on, and Python 3 will drop the "comma" syntax. Reviewed-By: Tomas Babej <tbabej@redhat.com>
This commit is contained in:
committed by
Tomas Babej
parent
a651be3eec
commit
27dabb4528
@@ -185,7 +185,7 @@ class Cookie(object):
|
||||
|
||||
try:
|
||||
dt = datetime.datetime(*email.utils.parsedate(s)[0:6])
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
raise ValueError("unable to parse expires datetime '%s': %s" % (s, e))
|
||||
|
||||
return dt
|
||||
@@ -594,7 +594,7 @@ class Cookie(object):
|
||||
from ipalib.util import validate_domain_name
|
||||
try:
|
||||
validate_domain_name(url_domain)
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
return False
|
||||
|
||||
if cookie_domain is None:
|
||||
|
||||
Reference in New Issue
Block a user