forked from platypush/platypush
The same applies to procedures - don't dump context as a JSON in case of exceptions
This commit is contained in:
parent
04ff008800
commit
36aee6f787
1 changed files with 2 additions and 3 deletions
|
@ -1,5 +1,4 @@
|
|||
import enum
|
||||
import json
|
||||
import logging
|
||||
import re
|
||||
from functools import wraps
|
||||
|
@ -345,7 +344,7 @@ class WhileProcedure(LoopProcedure):
|
|||
context[k] = eval('"{}"'.format(re.sub(r'(^|[^\\])"', '\1\\"', v)))
|
||||
except Exception as e:
|
||||
logger.warning('Could not parse value for context variable {}={}'.format(k, v))
|
||||
logger.warning('Context: {}'.format(json.dumps(context)))
|
||||
logger.warning('Context: {}'.format(context))
|
||||
logger.exception(e)
|
||||
|
||||
return context
|
||||
|
@ -460,7 +459,7 @@ class IfProcedure(Procedure):
|
|||
exec('{}="{}"'.format(k, re.sub(r'(^|[^\\])"', '\1\\"', v)))
|
||||
except Exception as e:
|
||||
logger.warning('Could not set context variable {}={}'.format(k, v))
|
||||
logger.warning('Context: {}'.format(json.dumps(context)))
|
||||
logger.warning('Context: {}'.format(context))
|
||||
logger.exception(e)
|
||||
|
||||
condition_true = eval(self.condition)
|
||||
|
|
Loading…
Reference in a new issue