Commit df86968a authored by Łukasz Nowak's avatar Łukasz Nowak

update-hash: Support _update_hash_filename_ key for some cases

A lot recipes treats filename key as something special, so for them support
additional key _update_hash_filename_, in order to avoid such clash.
parent c9b291ba
......@@ -44,7 +44,7 @@ import tempfile
# ConfigParser syntax in order to be strictly validated, to prevent misuse
# and allow easy extension (ex: to other hashes).
FILENAME_KEY = 'filename'
FILENAME_KEY_LIST = ['filename', '_update_hash_filename_']
HASH_MAP = {
'md5sum': hashlib.md5,
}
......@@ -97,7 +97,7 @@ def main():
name, value = line.split('=', 1)
name = name.strip()
value = value.strip()
if name == FILENAME_KEY:
if name in FILENAME_KEY_LIST:
hash_file_path = value
current_section.append(line)
else:
......
Markdown is supported
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