From a18452ab2e15660826ebb4975e5882d8e4a167e9 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 1 Dec 2019 16:48:57 +0100 Subject: [PATCH] Made procedure.[sync|async].name second argument optional A procedure will be sync if [sync|async] is not specified --- platypush/config/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/config/__init__.py b/platypush/config/__init__.py index 4759fbb4a..82505c069 100644 --- a/platypush/config/__init__.py +++ b/platypush/config/__init__.py @@ -162,8 +162,8 @@ class Config(object): self.cronjobs[cron_name] = self._config[key] elif key.startswith('procedure.'): tokens = key.split('.') - _async = True if tokens[1] == 'async' else False - procedure_name = '.'.join(tokens[2:]) + _async = True if len(tokens) > 2 and tokens[1] == 'async' else False + procedure_name = '.'.join(tokens[2:] if len(tokens) > 2 else tokens[1:]) self.procedures[procedure_name] = { '_async': _async, 'actions': self._config[key]