Skip to content

Commit

Permalink
Some black and coverge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
xen0l committed Jan 18, 2021
1 parent 082f392 commit 65cd1ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion aws_gate/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ def _plugin_exists_in_path():
def plugin_required(
wrapped_function, instance, args, kwargs
): # pylint: disable=unused-argument
if not _plugin_exists(PLUGIN_INSTALL_PATH) and not _plugin_exists_in_path() and not platform.system() == "Windows":
if (
not _plugin_exists(PLUGIN_INSTALL_PATH)
and not _plugin_exists_in_path()
and not platform.system() == "Windows"
):
raise OSError("{} not found".format(PLUGIN_NAME))

return wrapped_function(*args, **kwargs)
Expand Down
4 changes: 2 additions & 2 deletions aws_gate/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ def get_default_region():
@contextlib.contextmanager
def deferred_signals(signal_list=None):
if signal_list is None:
if hasattr(signal, 'SIGHUP'):
if hasattr(signal, "SIGHUP"):
signal_list = [signal.SIGHUP, signal.SIGINT, signal.SIGTERM]
else:
else: # pragma: no cover
signal_list = [signal.SIGINT, signal.SIGTERM]

for deferred_signal in signal_list:
Expand Down

0 comments on commit 65cd1ae

Please sign in to comment.