Skip to content

Commit e0aa6f7

Browse files
datasearchninjadan1
authored andcommitted
Fixes #155 Currently setting @configuration(distributed=True) results in a command that is NOT distributed.
1 parent adfa4d5 commit e0aa6f7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎splunklib/searchcommands/generating_command.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def iteritems(self):
320320
version = self.command.protocol_version
321321
if version == 2:
322322
iteritems = ifilter(lambda (name, value): name != 'distributed', iteritems)
323-
if self.distributed and self.type == 'streaming':
323+
if not self.distributed and self.type == 'streaming':
324324
iteritems = imap(
325325
lambda (name, value): (name, 'stateful') if name == 'type' else (name, value), iteritems)
326326
return iteritems

‎splunklib/searchcommands/streaming_command.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def iteritems(self):
180180
iteritems = ifilter(lambda (name, value): name != 'clear_required_fields', iteritems)
181181
else:
182182
iteritems = ifilter(lambda (name, value): name != 'distributed', iteritems)
183-
if self.distributed:
183+
if not self.distributed:
184184
iteritems = imap(
185185
lambda (name, value): (name, 'stateful') if name == 'type' else (name, value), iteritems)
186186
return iteritems

0 commit comments

Comments
 (0)