Remove an extra \$ from the EbuildQuote.var_reference regex
authorZac Medico <zmedico@gentoo.org>
Thu, 1 Nov 2007 18:19:53 +0000 (18:19 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 1 Nov 2007 18:19:53 +0000 (18:19 -0000)
so that it will properly match things like variable references
without braces, like $S.

svn path=/main/trunk/; revision=8354

pym/repoman/checks.py

index d6fcc13184fbb1cd707225986d4927c80948898b..66918cbd8fc05ef403220e4662982fcee224b2b7 100644 (file)
@@ -121,7 +121,7 @@ class EbuildQuote(ContentCheck):
        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+'}|' + \
-               r'\$' + var_names + '\W)')
+               var_names + '\W)')
        missing_quotes = re.compile(r'(\s|^)[^"\s]*\${?' + var_names + \
                r'}?[^"\s]*(\s|$)')
        cond_begin =  re.compile(r'(^|\s+)\[\[($|\\$|\s+)')