summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-11-01 18:26:41 +0000
committerZac Medico <zmedico@gentoo.org>2007-11-01 18:26:41 +0000
commit9eee27795cb42098f6036ee6f2183cf1a88e9343 (patch)
treefeffad83901226c1b61fb831954179ef1e455ba0
parenta3af6baaebf532a181fbb596e7c4032b1409050e (diff)
downloadportage-9eee27795cb42098f6036ee6f2183cf1a88e9343.tar.gz
portage-9eee27795cb42098f6036ee6f2183cf1a88e9343.tar.bz2
portage-9eee27795cb42098f6036ee6f2183cf1a88e9343.zip
Properly escape { and } characters in regular expressions even
though it seems to work either way. svn path=/main/trunk/; revision=8355
-rw-r--r--pym/repoman/checks.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py
index 66918cbd8..b6c430569 100644
--- a/pym/repoman/checks.py
+++ b/pym/repoman/checks.py
@@ -120,10 +120,10 @@ class EbuildQuote(ContentCheck):
repoman_check_name = 'ebuild.minorsyn'
ignore_line = re.compile(r'(^$)|(^\s*#.*)|(^\s*\w+=.*)|(^\s*(local|export)\s+)')
var_names = r'(D|S|T|ROOT|FILESDIR|WORKDIR)'
- var_reference = re.compile(r'\$({'+var_names+'}|' + \
+ var_reference = re.compile(r'\$(\{'+var_names+'\}|' + \
var_names + '\W)')
- missing_quotes = re.compile(r'(\s|^)[^"\s]*\${?' + var_names + \
- r'}?[^"\s]*(\s|$)')
+ missing_quotes = re.compile(r'(\s|^)[^"\s]*\$\{?' + var_names + \
+ r'\}?[^"\s]*(\s|$)')
cond_begin = re.compile(r'(^|\s+)\[\[($|\\$|\s+)')
cond_end = re.compile(r'(^|\s+)\]\]($|\\$|\s+)')