diff options
| author | zdc <zdc@users.noreply.github.com> | 2022-04-07 20:24:57 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-07 20:24:57 +0300 |
| commit | 45c1d42e15f4a5fe5e176e1516b2da9d21e7837a (patch) | |
| tree | 0535c3cf76b60dbf585416b4490c5bd9c9c99359 /cloudinit/handlers/shell_script.py | |
| parent | 96226f37cdbdaef2fbc51de7b9ca75b61a16792b (diff) | |
| parent | aa60d48c2711cdcd9f88a4e5c77379adb0408231 (diff) | |
| download | vyos-cloud-init-45c1d42e15f4a5fe5e176e1516b2da9d21e7837a.tar.gz vyos-cloud-init-45c1d42e15f4a5fe5e176e1516b2da9d21e7837a.zip | |
Merge pull request #52 from vyos/current
T2117: Backport Cloud-init 22.1 with our changes to VyOS 1.3
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 |
