Skip to content

Commit 8369ba3

Browse files
committed
use in operator instead of get
1 parent bca9359 commit 8369ba3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mlapi.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,12 @@ def post(self):
123123
if not req:
124124
req = {}
125125
# abort(400, msg='Empty request')
126-
g.logger.Debug (4,'***** REMOVE ME: Got req: {}'.format(req))
127-
if req.get('mid') and g.monitor_config.get(str(req.get('mid'))):
126+
#g.logger.Debug (4,'***** REMOVE ME: g.monitor_config: {}'.format(g.monitor_config))
127+
#g.logger.Debug (4,'***** REMOVE ME: g.monitor_polygons: {}'.format(g.monitor_polygons))
128+
#g.logger.Debug (4,'***** REMOVE ME: g.monitor_zone_patterns: {}'.format(g.monitor_zone_patterns))
129+
130+
#g.logger.Debug (4,'***** REMOVE ME: Got req: {}'.format(req))
131+
if req.get('mid') and str(req.get('mid')) in g.monitor_config:
128132
mid = str(req.get('mid'))
129133
g.logger.Debug (1, f'Monitor ID {mid} provided & matching config found in mlapi, ignoring objectconfig.ini')
130134
config_copy = copy.copy(g.config)

0 commit comments

Comments
 (0)