File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments