Skip to content
Snippets Groups Projects
Commit 351370fc authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

SW-772: re doesn't like escaping in unicode, so use raw strings

parent d35638f2
No related branches found
No related tags found
1 merge request!8Cobalt2 multithreading fix
...@@ -1076,8 +1076,8 @@ class AbstractMessageHandler: ...@@ -1076,8 +1076,8 @@ class AbstractMessageHandler:
""" """
# introspection magic to get all methods called from within this handler's handle_message method. # introspection magic to get all methods called from within this handler's handle_message method.
r1 = re.compile("self\.on(.)+\(.*\)") r1 = re.compile(r"self\.on(.)+\(.*\)")
r2 = re.compile("\(.*") r2 = re.compile(r"\(.*")
called_template_methods_from_handle_message = set([r2.sub("", l.strip().replace("self.","")) for l in inspect.getsource(self.handle_message).split('\n') if r1.search(l)]) called_template_methods_from_handle_message = set([r2.sub("", l.strip().replace("self.","")) for l in inspect.getsource(self.handle_message).split('\n') if r1.search(l)])
for method_name, member_func in inspect.getmembers(self, inspect.ismethod): for method_name, member_func in inspect.getmembers(self, inspect.ismethod):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment