diff --git a/salt/modules/linux_sysctl.py b/salt/modules/linux_sysctl.py index 492231d7d4..862ebe1383 100644 --- a/salt/modules/linux_sysctl.py +++ b/salt/modules/linux_sysctl.py @@ -113,7 +113,7 @@ def persist(name, value, config='/etc/sysctl.conf'): # and it seems unnecessary to indent the below for # loop since it is a fairly large block of code. config_data = _fh.readlines() - except (IOError, OSError) as exc: + except (IOError, OSError): msg = 'Could not read from file: {0}' raise CommandExecutionError(msg.format(config))