Followup to licensify.py (#2735)

Use startwith and endswith
This commit is contained in:
Erik Arvidsson
2016-10-19 13:05:29 -07:00
committed by GitHub
parent e164f8aeec
commit 8e240b8a80
+2 -1
View File
@@ -33,7 +33,8 @@ comment_markers = {
def main():
files = subprocess.check_output(['git', 'ls-files']).split('\n')
for n in files:
if n != '' and 'vendor/' not in n and '.min.js' not in n:
if n != '' and not n.startswith('vendor/') and (
not n.endswith('.min.js')):
_, ext = os.path.splitext(n)
if ext == '':
continue