fix Out of Code detetction indexerror
This commit is contained in:
parent
d41ca9e656
commit
1c80d84e9c
@ -99,7 +99,7 @@ def find_all_code_type(path):
|
|||||||
types = re.findall(r'[:|\.\.\s]code::?\s(\w+)', source.read())
|
types = re.findall(r'[:|\.\.\s]code::?\s(\w+)', source.read())
|
||||||
try:
|
try:
|
||||||
popular_type = Counter(types).most_common()[0][0]
|
popular_type = Counter(types).most_common()[0][0]
|
||||||
except KeyError:
|
except IndexError:
|
||||||
popular_type = "lua" # Don't break default
|
popular_type = "lua" # Don't break default
|
||||||
|
|
||||||
return popular_type
|
return popular_type
|
||||||
|
Loading…
Reference in New Issue
Block a user