diff options
author | Nicky <nicky.dasmijn@posteo.nl> | 2024-08-03 14:23:57 +0200 |
---|---|---|
committer | Nicky <nicky.dasmijn@posteo.nl> | 2024-08-03 14:23:57 +0200 |
commit | 6cd306e9bf3698551beb70ec6ddfde7f6cec12bd (patch) | |
tree | 98ed3a531a1e364e4f542ae791d9211ce29f0956 /indra | |
parent | 9c4b6a04166c0053b147f9064056a50644be4d6b (diff) |
Use python raw string literals to remove any ambiguity with standard escape sequences like \n
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/lib/python/indra/util/llmanifest.py | 2 | ||||
-rwxr-xr-x | indra/newview/viewer_manifest.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py index 38de9c7cf1..b5fdccc9ba 100755 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -309,7 +309,7 @@ def main(extra=[]): class LLManifestRegistry(type): def __init__(cls, name, bases, dct): super(LLManifestRegistry, cls).__init__(name, bases, dct) - match = re.match("(\w+)Manifest", name) + match = re.match(r"(\w+)Manifest", name) if match: cls.manifests[match.group(1).lower()] = cls diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 6be43f0021..d94bdc31d2 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -277,13 +277,13 @@ class ViewerManifest(LLManifest): # All lines up to and including the first blank line are the file header; skip them lines.reverse() # so that pop will pull from first to last line - while not re.match("\s*$", lines.pop()) : + while not re.match(r"\s*$", lines.pop()) : pass # do nothing # A line that starts with a non-whitespace character is a name; all others describe contributions, so collect the names names = [] for line in lines : - if re.match("\S", line) : + if re.match(r"\S", line) : names.append(line.rstrip()) # It's not fair to always put the same people at the head of the list random.shuffle(names) |