jenkins-bot merged this change.
Remove caret from re.match
Change-Id: I9a634e21d0acd833a0f5cf6c61c3ff3639554b0d
---
M scripts/listpages.py
M tests/utils.py
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/listpages.py b/scripts/listpages.py
index 1ec6268..fa6e2eb 100755
--- a/scripts/listpages.py
+++ b/scripts/listpages.py
@@ -248,7 +248,7 @@
'replace the content of this page.'
.format(page_target.title(as_link=True)))
return False
- if re.match('^[a-z_-]+$', summary):
+ if re.match('[a-z_-]+$', summary):
summary = i18n.twtranslate(site, summary)
gen = gen_factory.getCombinedGenerator()
diff --git a/tests/utils.py b/tests/utils.py
index d58c75c..3b69183 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -87,7 +87,7 @@
except AssertionError:
tb = traceback.extract_tb(sys.exc_info()[2])
for depth, line in enumerate(tb):
- if re.match('^assert[A-Z]', line[2]):
+ if re.match('assert[A-Z]', line[2]):
break
tb = traceback.format_list(tb[:depth])
pywikibot.error('\n' + ''.join(tb)[:-1]) # remove \n at the end
To view, visit change 508073. To unsubscribe, or for help writing mail filters, visit settings.