Make the dictionary sorting a bit more sensible
This commit is contained in:
parent
4552050136
commit
1b600b147d
@ -138,6 +138,7 @@ def get_locale_path(bundle_id):
|
|||||||
# Set lowest priority
|
# Set lowest priority
|
||||||
candidate_dirs[candidate_dir] = -1
|
candidate_dirs[candidate_dir] = -1
|
||||||
|
|
||||||
# Fancy way to sort the dictionary by value
|
sorted_dict = sorted(candidate_dirs.iteritems(), key=lambda (k, v): \
|
||||||
return sorted(candidate_dirs.iteritems(), key=lambda (k, v): (v, k), \
|
(v, k), reverse=True)
|
||||||
reverse=True)[0][0]
|
|
||||||
|
return sorted_dict[0][0]
|
||||||
|
Loading…
Reference in New Issue
Block a user