Kaydet (Commit) 82026d61 authored tarafından Tim Graham's avatar Tim Graham

Refs #27843 -- Fixed 'invalid escape sequence' warning in truncate_name().

üst fba4f831
...@@ -183,7 +183,7 @@ def truncate_name(name, length=None, hash_len=4): ...@@ -183,7 +183,7 @@ def truncate_name(name, length=None, hash_len=4):
If a quote stripped name contains a username, e.g. USERNAME"."TABLE, If a quote stripped name contains a username, e.g. USERNAME"."TABLE,
truncate the table portion only. truncate the table portion only.
""" """
match = re.match('([^"]+)"\."([^"]+)', name) match = re.match(r'([^"]+)"\."([^"]+)', name)
table_name = match.group(2) if match else name table_name = match.group(2) if match else name
if length is None or len(table_name) <= length: if length is None or len(table_name) <= length:
......
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