From: Nathan Binkert Date: Wed, 13 Apr 2011 16:32:17 +0000 (-0700) Subject: util: fix the language type function X-Git-Tag: stable_2012_02_02~406 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=326adda5f39d7aa90c573ad3444d27a3defbd1bc;p=gem5.git util: fix the language type function --- diff --git a/util/file_types.py b/util/file_types.py index 3315a747f..8fc2b1af4 100644 --- a/util/file_types.py +++ b/util/file_types.py @@ -70,7 +70,7 @@ def lang_type(filename, firstline=None, openok=True): # now try to detect language based on file prefix for start,lang in lang_prefixes: if basename.startswith(start): - return start + return lang # if a first line was not provided but the file is ok to open, # grab the first line of the file.