summaryrefslogtreecommitdiffstats
path: root/install/tools
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2016-03-11 19:51:07 +0100
committerMartin Basti <mbasti@redhat.com>2016-03-22 10:20:51 +0100
commit491447cc5ab8c5eff2be57d609201cefb79f7053 (patch)
tree401ff990eddb00a6fed63ed9dd5c0e4b546799c4 /install/tools
parentaa749957360b85fecaed2f9f8dc286f560b89e0b (diff)
downloadfreeipa-491447cc5ab8c5eff2be57d609201cefb79f7053.tar.gz
freeipa-491447cc5ab8c5eff2be57d609201cefb79f7053.tar.xz
freeipa-491447cc5ab8c5eff2be57d609201cefb79f7053.zip
pylint: remove bare except
Bare except should not be used. Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
Diffstat (limited to 'install/tools')
-rwxr-xr-xinstall/tools/ipa-replica-manage2
-rwxr-xr-xinstall/tools/ipactl10
2 files changed, 6 insertions, 6 deletions
diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage
index 0497a0f05..075e4293e 100755
--- a/install/tools/ipa-replica-manage
+++ b/install/tools/ipa-replica-manage
@@ -597,7 +597,7 @@ def clean_dangling_ruvs(realm, host, options):
conn = ipaldap.IPAdmin(master_cn, 636, cacert=CACERT)
conn.do_simple_bind(bindpw=options.dirman_passwd)
master_info['online'] = True
- except:
+ except Exception:
print("The server '{host}' appears to be offline."
.format(host=master_cn))
offlines.add(master_cn)
diff --git a/install/tools/ipactl b/install/tools/ipactl
index d27ada565..fb1e890ea 100755
--- a/install/tools/ipactl
+++ b/install/tools/ipactl
@@ -343,13 +343,13 @@ def ipa_stop(options):
try:
print("Stopping %s Service" % svc)
svchandle.stop(capture_output=False)
- except:
+ except Exception:
emit_err("Failed to stop %s Service" % svc)
try:
print("Stopping Directory Service")
dirsrv.stop(capture_output=False)
- except:
+ except Exception:
raise IpactlError("Failed to stop Directory Service")
# remove file with list of started services
@@ -383,7 +383,7 @@ def ipa_restart(options):
emit_err("Shutting down")
try:
dirsrv.stop(capture_output=False)
- except:
+ except Exception:
pass
if isinstance(e, IpactlError):
# do not display any other error message
@@ -421,7 +421,7 @@ def ipa_restart(options):
try:
print("Stopping %s Service" % svc)
svchandle.stop(capture_output=False)
- except:
+ except Exception:
emit_err("Failed to stop %s Service" % svc)
try:
@@ -521,7 +521,7 @@ def ipa_status(options):
print("%s Service: RUNNING" % svc)
else:
print("%s Service: STOPPED" % svc)
- except:
+ except Exception:
emit_err("Failed to get %s Service status" % svc)
def main():