Skip to content

Commit 795a44e

Browse files
add path to search commands examples (splunk#248)
1 parent 44eb11c commit 795a44e

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

examples/searchcommands_template/bin/filter.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env python
22

33
import sys
4+
import os
5+
6+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "lib"))
47
from splunklib.searchcommands import \
58
dispatch, StreamingCommand, Configuration, Option, validators
69

examples/searchcommands_template/bin/generate.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env python
22

33
import sys
4+
import os
5+
6+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "lib"))
47
from splunklib.searchcommands import \
58
dispatch, GeneratingCommand, Configuration, Option, validators
69

examples/searchcommands_template/bin/report.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env python
22

33
import sys
4+
import os
5+
6+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "lib"))
47
from splunklib.searchcommands import \
58
dispatch, ReportingCommand, Configuration, Option, validators
69

examples/searchcommands_template/bin/stream.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env python
22

33
import sys
4+
import os
5+
6+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "lib"))
47
from splunklib.searchcommands import \
58
dispatch, StreamingCommand, Configuration, Option, validators
69

0 commit comments

Comments
 (0)