Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

PushDefinition automatically prefixes output param

When adding output params to a PushDefinition, the output param is prefixed with "output_params." so that any subsequent access to it for validate or subscribe calls is correct.
  • Loading branch information...
commit 361f7791ba272459701f40302f7f083d4e7da15c 1 parent ced5555
@jairamc jairamc authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 datasift/__init__.py
View
6 datasift/__init__.py
@@ -917,7 +917,7 @@ def get_output_param(self, key):
"""
Get an output parameter.
"""
- return self._output_params[key]
+ return self._output_params[self.OUTPUT_PARAMS_PREFIX + key]
def get_output_params(self):
"""
@@ -929,7 +929,7 @@ def set_output_param(self, key, val):
"""
Set an output parameter.
"""
- self._output_params[key] = val
+ self._output_params[self.OUTPUT_PARAMS_PREFIX + key] = val
def validate(self):
"""
@@ -977,7 +977,7 @@ def subscribe(self, hash_type, hash, name):
'output_type': self.get_output_type()
}
for key in self._output_params:
- params[self.OUTPUT_PARAMS_PREFIX + key] = self._output_params[key]
+ params[key] = self._output_params[key]
if len(self.get_initial_status()) > 0:
params['initial_status'] = self.get_initial_status()
Please sign in to comment.
Something went wrong with that request. Please try again.