diff options
author | James Falcon <james.falcon@canonical.com> | 2021-12-15 20:16:38 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-15 19:16:38 -0700 |
commit | bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf (patch) | |
tree | 1fbb3269fc87e39832e3286ef42eefd2b23fcd44 /cloudinit/handlers/shell_script.py | |
parent | 2bcf4fa972fde686c2e3141c58e640640b44dd00 (diff) | |
download | vyos-cloud-init-bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf.tar.gz vyos-cloud-init-bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf.zip |
Adopt Black and isort (SC-700) (#1157)
Applied Black and isort, fixed any linting issues, updated tox.ini
and CI.
Diffstat (limited to 'cloudinit/handlers/shell_script.py')
-rw-r--r-- | cloudinit/handlers/shell_script.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/cloudinit/handlers/shell_script.py b/cloudinit/handlers/shell_script.py index 9917f551..44061838 100644 --- a/cloudinit/handlers/shell_script.py +++ b/cloudinit/handlers/shell_script.py @@ -10,21 +10,19 @@ import os -from cloudinit import handlers -from cloudinit import util - -from cloudinit.settings import (PER_ALWAYS) +from cloudinit import handlers, util +from cloudinit.settings import PER_ALWAYS class ShellScriptPartHandler(handlers.Handler): - prefixes = ['#!'] + prefixes = ["#!"] def __init__(self, paths, **_kwargs): handlers.Handler.__init__(self, PER_ALWAYS) - self.script_dir = paths.get_ipath_cur('scripts') - if 'script_path' in _kwargs: - self.script_dir = paths.get_ipath_cur(_kwargs['script_path']) + self.script_dir = paths.get_ipath_cur("scripts") + if "script_path" in _kwargs: + self.script_dir = paths.get_ipath_cur(_kwargs["script_path"]) def handle_part(self, data, ctype, filename, payload, frequency): if ctype in handlers.CONTENT_SIGNALS: @@ -36,4 +34,5 @@ class ShellScriptPartHandler(handlers.Handler): path = os.path.join(self.script_dir, filename) util.write_file(path, payload, 0o700) + # vi: ts=4 expandtab |