misc: allow _ as first variable character (for legacy ezt compat) (#53987)

This commit is contained in:
Frédéric Péters 2021-05-14 11:32:47 +02:00
parent 7255de9d3e
commit 0806a631fd
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ class CompatibilityNamesDict(dict):
# custom dictionary that provides automatic fallback to legacy variable
# names (namespaced with underscores)
valid_key_regex = re.compile(r'^[a-zA-Z][a-zA-Z0-9_]*$')
valid_key_regex = re.compile(r'^[a-zA-Z_][a-zA-Z0-9_]*$')
def get(self, key, default=None):
try: