From 5b49f78d36485b8e5c37bdc6827d81682a27db7b Mon Sep 17 00:00:00 2001 From: Nirenjan Krishnan Date: Wed, 6 Nov 2019 16:03:50 -0800 Subject: [PATCH] Fix syntax errors on Host service --- debian/control | 2 +- scripts/host_modules/ztp.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/control b/debian/control index 845c73bf71..abe2dbee42 100644 --- a/debian/control +++ b/debian/control @@ -14,5 +14,5 @@ Description: SONiC Management Framework Package: sonic-host-service Priority: extra Architecture: amd64 -Depends: python-dbus, python-gobject, ${shlibs:Depends}, ${misc:Depends} +Depends: python-dbus, python-gobject, python-systemd, ${shlibs:Depends}, ${misc:Depends} Description: SONiC Host Service diff --git a/scripts/host_modules/ztp.py b/scripts/host_modules/ztp.py index 87d69b4f02..5bcf84dd50 100644 --- a/scripts/host_modules/ztp.py +++ b/scripts/host_modules/ztp.py @@ -14,7 +14,7 @@ def _run_command(commands): cmd = ['/usr/bin/ztp'] if isinstance(commands, list): cmd.extend(commands) - else + else: cmd.append(commands) try: @@ -28,15 +28,15 @@ def _run_command(commands): @host_service.method(host_service.bus_name(MOD_NAME), in_signature='', out_signature='') def enable(self): - _run_command("enable") + self._run_command("enable") @host_service.method(host_service.bus_name(MOD_NAME), in_signature='', out_signature='') def disable(self): - _run_command(["disable", "-y"]) + self._run_command(["disable", "-y"]) @host_service.method(host_service.bus_name(MOD_NAME), in_signature='', out_signature='is') def status(self): - return _run_command("status") + return self._run_command("status") def register(): """Return the class name"""