Skip to content

Commit edd5d1f

Browse files
Fixes #155 Currently setting @configuration(distributed=True) results in a command that is NOT distributed.
1 parent 833b530 commit edd5d1f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

splunklib/searchcommands/generating_command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def iteritems(self):
308308
version = self.command.protocol_version
309309
if version == 2:
310310
iteritems = ifilter(lambda (name, value): name != 'distributed', iteritems)
311-
if self.distributed and self.type == 'streaming':
311+
if not self.distributed and self.type == 'streaming':
312312
iteritems = imap(
313313
lambda (name, value): (name, 'stateful') if name == 'type' else (name, value), iteritems)
314314
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)