diff --git a/python3/Makefile b/python3/Makefile index 4117ad4fc35..8f34cb8e107 100644 --- a/python3/Makefile +++ b/python3/Makefile @@ -28,6 +28,7 @@ install: $(IPROG) bin/xe-scsi-dev-map $(DESTDIR)$(OPTDIR)/bin $(IPROG) plugins/disk-space $(DESTDIR)$(PLUGINDIR) $(IPROG) plugins/install-supp-pack $(DESTDIR)$(PLUGINDIR) + $(IPROG) plugins/echo.py $(DESTDIR)$(PLUGINDIR)/echo # poweron $(IPROG) poweron/wlan.py $(DESTDIR)$(PLUGINDIR)/wlan.py diff --git a/scripts/examples/python/echo.py b/python3/plugins/echo.py similarity index 74% rename from scripts/examples/python/echo.py rename to python3/plugins/echo.py index 57f70492c6c..27020e17065 100644 --- a/scripts/examples/python/echo.py +++ b/python3/plugins/echo.py @@ -5,8 +5,8 @@ import XenAPIPlugin - -def main(session, args): +# The 1st argument is the session. This plugin does not use it, hence use _: +def main(_, args): if "sleep" in args: secs = int(args["sleep"]) time.sleep(secs) diff --git a/scripts/Makefile b/scripts/Makefile index 434d0819de1..705b161158a 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -161,7 +161,6 @@ endif sed -i 's/#!\/usr\/bin\/python/#!\/usr\/bin\/python3/' $(DESTDIR)$(SITE3_DIR)/XenAPIPlugin.py $(IDATA) examples/python/XenAPI/XenAPI.py $(DESTDIR)$(SITE3_DIR)/ $(IDATA) examples/python/inventory.py $(DESTDIR)$(SITE3_DIR)/ - $(IPROG) examples/python/echo.py $(DESTDIR)$(PLUGINDIR)/echo $(IPROG) examples/python/shell.py $(DESTDIR)$(LIBEXECDIR)/shell.py # YUM plugins $(IPROG) yum-plugins/accesstoken.py $(DESTDIR)$(YUMPLUGINDIR)