summaryrefslogtreecommitdiffstats
path: root/ipatests/test_webui
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-07-30 16:49:29 +0200
committerTomas Babej <tbabej@redhat.com>2015-08-12 18:17:23 +0200
commit27dabb45282911e375336f75934af9dd6cc5d963 (patch)
tree3c8fe5255d60613fa9cd14d053b3688feed740c9 /ipatests/test_webui
parenta651be3eec2a08bd2865b16b0eed767db69aab0f (diff)
downloadfreeipa-27dabb45282911e375336f75934af9dd6cc5d963.tar.gz
freeipa-27dabb45282911e375336f75934af9dd6cc5d963.tar.xz
freeipa-27dabb45282911e375336f75934af9dd6cc5d963.zip
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>
Diffstat (limited to 'ipatests/test_webui')
-rw-r--r--ipatests/test_webui/ui_driver.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ipatests/test_webui/ui_driver.py b/ipatests/test_webui/ui_driver.py
index 4b382d8fb..16af5ff16 100644
--- a/ipatests/test_webui/ui_driver.py
+++ b/ipatests/test_webui/ui_driver.py
@@ -144,9 +144,9 @@ class UI_driver(object):
try:
with open(path, 'r') as conf:
self.config = yaml.load(conf)
- except yaml.YAMLError, e:
+ except yaml.YAMLError as e:
raise nose.SkipTest("Invalid Web UI config.\n%s" % e)
- except IOError, e:
+ except IOError as e:
raise nose.SkipTest("Can't load Web UI test config: %s" % e)
else:
self.config = {}
@@ -198,9 +198,9 @@ class UI_driver(object):
driver = webdriver.Remote(
command_executor='http://%s:%d/wd/hub' % (host, port),
desired_capabilities=capabilities)
- except URLError, e:
+ except URLError as e:
raise nose.SkipTest('Error connecting to selenium server: %s' % e)
- except RuntimeError, e:
+ except RuntimeError as e:
raise nose.SkipTest('Error while establishing webdriver: %s' % e)
else:
try:
@@ -213,9 +213,9 @@ class UI_driver(object):
if "ff_profile" in self.config:
fp = webdriver.FirefoxProfile(self.config["ff_profile"])
driver = webdriver.Firefox(fp)
- except URLError, e:
+ except URLError as e:
raise nose.SkipTest('Error connecting to selenium server: %s' % e)
- except RuntimeError, e:
+ except RuntimeError as e:
raise nose.SkipTest('Error while establishing webdriver: %s' % e)
return driver