mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-05 16:21:20 +00:00
Refactor trivial piece of code overcomplicated
This commit is contained in:
parent
557318af4e
commit
be244217aa
@ -96,7 +96,4 @@ def map_file_extension_to_language(filename):
|
||||
'.cs': 'csharp'
|
||||
}
|
||||
_, extension = splitext(filename)
|
||||
language = 'text'
|
||||
try: language = language_map[extension]
|
||||
except KeyError: log.debug('No such extension in list, falling back to default: "{}".'.format(language))
|
||||
return language
|
||||
return language_map.get(extension, 'text')
|
Loading…
Reference in New Issue
Block a user