diff --git a/src/event_handlers/source_code_event_handler.py b/src/event_handlers/source_code_event_handler.py index 3f128cf..aa57777 100644 --- a/src/event_handlers/source_code_event_handler.py +++ b/src/event_handlers/source_code_event_handler.py @@ -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 \ No newline at end of file + return language_map.get(extension, 'text') \ No newline at end of file