зеркало из https://github.com/mozilla/gecko-dev.git
Bug 800329 - Check for value before checking its contents. r=ted
This commit is contained in:
Родитель
8bc72dca3a
Коммит
62e4c57e38
|
@ -45,7 +45,7 @@ def get_locale_strings(path, prefix, middle, add_cr):
|
|||
|
||||
name, value = line.split("=", 1)
|
||||
value = value.strip() # trim whitespace from the start and end
|
||||
if value[-1] == "\"" and value[0] == "\"":
|
||||
if value and value[-1] == "\"" and value[0] == "\"":
|
||||
value = value[1:-1] # remove " from the start and end
|
||||
|
||||
if add_cr:
|
||||
|
|
Загрузка…
Ссылка в новой задаче