Commit f82d2680 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

fix bug in _get_file_description

parent 76e5c9aa
......@@ -410,12 +410,14 @@ class Analyse (object):
# If we have more than 1 description available, use the one in between .[desc].
final_descriptions = {}
final_description = os.path.splitext(file)[0]
if len(best_description) > 1:
for bdescription in best_description.keys():
mid_desc_regex = re.compile(".*\." + bdescription + "\..*")
mdr = mid_desc_regex.match(file)
if mdr != None:
final_descriptions[bdescription] = best_description[bdescription]
final_description = best_description[bdescription]
# If more than a description match, take the longuest
if len(final_descriptions) != 1:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment