Skip to content

Commit 8a27334

Browse files
author
David Noble
committed
splunklib.searchcommands
Setup.py improvements
1 parent e752a65 commit 8a27334

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

setup.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,17 +142,14 @@ def run(self):
142142
arc_app_dir = 'searchcommands_app'
143143

144144
lib_dir = os.path.join(sdk_dir, 'splunklib', 'searchcommands')
145-
arc_app_lib_dir = os.path.join(
146-
arc_app_dir, 'bin', 'splunklib', 'searchcommands')
145+
arc_app_lib_dir = os.path.join(arc_app_dir, 'bin', 'splunklib', 'searchcommands')
147146

148147
def exclude(path):
149148
basename = os.path.basename(path)
150-
result = (
151-
fnmatch(basename, '.DS_Store') or
152-
fnmatch(basename, '.idea') or
153-
fnmatch(basename, '*.py[co]') or
154-
fnmatch(basename, '*.log'))
155-
return result
149+
for pattern in ['.DS_Store', '.idea', '*.log', '*.py[co]']:
150+
if fnmatch(basename, pattern):
151+
return False
152+
return True
156153

157154
with tarfile.open(tarball, "w") as spl:
158155
spl.add(app_dir, arcname=arc_app_dir, exclude=exclude)

0 commit comments

Comments
 (0)