Skip to content
Snippets Groups Projects
Commit 9a4d5029 authored by Bienchen's avatar Bienchen
Browse files

Simpler file type detection

parent 75490435
Branches
Tags
No related merge requests found
......@@ -99,7 +99,9 @@ def GetFileType(filepath):
except Exception, e:
FailMsg("Failed to run 'file %s': '%s'" % (filepath, str(e)), 11)
fo = fo.strip()
if fo == "%s: a python script text executable" % filepath:
if fo.endswith('.py'):
return "python"
elif fo == "%s: a python script text executable" % filepath:
return "python"
elif fo == "%s: a ost script text executable" % filepath:
return "python"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment