Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

PushDefinition automatically prefixes output param #26

Merged
merged 1 commit into from

2 participants

@jairamc
Owner

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.

@jairamc jairamc 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.
361f779
@jairamc
Owner

See #25 for details on why this fix is required.

@dugjason dugjason merged commit 2dddb7d into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 7, 2013
  1. @jairamc

    PushDefinition automatically prefixes output param

    jairamc authored
    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.
This page is out of date. Refresh to see the latest.
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()
Something went wrong with that request. Please try again.