1
0
mirror of https://github.com/gsi-upm/senpy synced 2025-08-23 18:12:20 +00:00

Added CLI and refactored argument parsing

This commit is contained in:
J. Fernando Sánchez
2016-03-02 05:07:48 +01:00
parent a50f026701
commit 03eb38c12d
11 changed files with 207 additions and 136 deletions

View File

@@ -5,10 +5,6 @@ from time import sleep
class SleepPlugin(SenpyPlugin):
def __init__(self, info, *args, **kwargs):
super(SleepPlugin, self).__init__(info, *args, **kwargs)
self.timeout = int(info["timeout"])
def activate(self, *args, **kwargs):
sleep(self.timeout)

View File

@@ -4,7 +4,7 @@
"description": "I am dummy",
"author": "@balkian",
"version": "0.1",
"timeout": "2",
"timeout": 0.5,
"extra_params": {
"timeout": {
"@id": "timeout_sleep",