summaryrefslogtreecommitdiffstats
path: root/client/ipa-client-install
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2016-10-04 16:54:44 +0200
committerMartin Basti <mbasti@redhat.com>2016-10-06 10:43:36 +0200
commitd9375881460d63cdd696bb0705da0ac205db9870 (patch)
tree3c7c4016f6b5ffd48f390d74003dffdf97b6a0ea /client/ipa-client-install
parentac94d32c4fd543e33211c0331330c80c619e0058 (diff)
downloadfreeipa-d9375881460d63cdd696bb0705da0ac205db9870.tar.gz
freeipa-d9375881460d63cdd696bb0705da0ac205db9870.tar.xz
freeipa-d9375881460d63cdd696bb0705da0ac205db9870.zip
Pylint: remove unused variables from installers and scripts
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Diffstat (limited to 'client/ipa-client-install')
-rwxr-xr-xclient/ipa-client-install17
1 files changed, 7 insertions, 10 deletions
diff --git a/client/ipa-client-install b/client/ipa-client-install
index d38eaf951..da7d6b37d 100755
--- a/client/ipa-client-install
+++ b/client/ipa-client-install
@@ -72,8 +72,6 @@ error was:
""" % e, file=sys.stderr)
sys.exit(1)
-# pylint: disable=unused-variable
-
SUCCESS = 0
CLIENT_INSTALL_ERROR = 1
CLIENT_NOT_CONFIGURED = 2
@@ -97,7 +95,7 @@ def parse_options():
initialized = nss.nss_is_initialized()
try:
cert = x509.load_certificate_from_file(value)
- except Exception as e:
+ except Exception:
raise OptionValueError("%s option '%s' is not a valid certificate file" % (opt, value))
else:
del(cert)
@@ -230,7 +228,7 @@ def parse_options():
"be run with --unattended option")
parser.add_option_group(uninstall_group)
- options, args = parser.parse_args()
+ options, _args = parser.parse_args()
safe_opts = parser.get_safe_opts(options)
if (options.server and not options.domain):
@@ -383,7 +381,6 @@ def nssldap_exists():
# helper function for uninstall
# deletes IPA domain from sssd.conf
def delete_ipa_domain():
- sssd = services.service('sssd')
try:
sssdconfig = SSSDConfig.SSSDConfig()
sssdconfig.import_config()
@@ -1509,7 +1506,7 @@ def configure_nisdomain(options, domain):
try:
result = ipautil.run([paths.BIN_NISDOMAINNAME],
capture_output=True)
- except CalledProcessError as e:
+ except CalledProcessError:
pass
else:
nis_domain_name = result.output
@@ -1748,7 +1745,7 @@ def verify_dns_update(fqdn, ips):
def get_server_connection_interface(server):
# connect to IPA server, get all ip addresses of inteface used to connect
for res in socket.getaddrinfo(server, 389, socket.AF_UNSPEC, socket.SOCK_STREAM):
- (af, socktype, proto, canonname, sa) = res
+ af, socktype, proto, _canonname, sa = res
try:
s = socket.socket(af, socktype, proto)
except socket.error as e:
@@ -1923,7 +1920,7 @@ def get_ca_certs_from_file(url):
root_logger.debug("trying to retrieve CA cert from file %s", filename)
try:
certs = x509.load_certificate_list_from_file(filename)
- except Exception as e:
+ except Exception:
raise errors.NoCertificateError(entry=filename)
return certs
@@ -1944,7 +1941,7 @@ def get_ca_certs_from_http(url, warn=True):
try:
result = run([paths.BIN_CURL, "-o", "-", url], capture_output=True)
- except CalledProcessError as e:
+ except CalledProcessError:
raise errors.NoCertificateError(entry=url)
stdout = result.output
@@ -2981,7 +2978,7 @@ def install(options, env, fstore, statestore):
if nslcd.is_installed():
save_state(nslcd)
- retcode, conf, filename = (0, None, None)
+ retcode, conf = (0, None)
if not options.no_ac:
# Modify nsswitch/pam stack