diff options
author | Michael Palimaka <kensington@gentoo.org> | 2016-12-22 06:55:26 +1100 |
---|---|---|
committer | Michael Palimaka <kensington@gentoo.org> | 2016-12-22 06:55:26 +1100 |
commit | 7dd52752e69260250c98f6174894b9fab7d5f59b (patch) | |
tree | 7175e6269fc2880e09873435cef44d3ceb637b8c | |
parent | Avoid traceback when no atoms are found. (diff) | |
download | tatt-7dd52752e69260250c98f6174894b9fab7d5f59b.tar.gz tatt-7dd52752e69260250c98f6174894b9fab7d5f59b.tar.bz2 tatt-7dd52752e69260250c98f6174894b9fab7d5f59b.zip |
Escape package name in regexp.
Otherwise, a package like dev-libs/libsigc++ will raise a multiple repeat
exception.
-rwxr-xr-x | scripts/tatt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/tatt b/scripts/tatt index 66d91dc..205adcb 100755 --- a/scripts/tatt +++ b/scripts/tatt @@ -200,7 +200,7 @@ if myJob.packageList is not None and len(myJob.packageList) > 0: unmaskfileContent = unmaskfile.read() for p in myJob.packageList: # Test if unmaskfile already contains the atom - if re.search(p.packageString(), unmaskfileContent): + if re.search(re.escape(p.packageString()), unmaskfileContent): print (p.packageString() + " already in "+config['unmaskfile']) else: unmaskfile.write(p.packageString()) |