Update of /cvsroot/tmda/tmda/TMDA
In directory usw-pr-cvs1:/tmp/cvs-serv9406/TMDA
Modified Files:
ChangeLog FilterParser.py
Log Message:
Correct some Python2.2onlyisms.
'in' or 'not in' only works on sequences, and not on mapping types
like dictionaries in Python < 2.2.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/ChangeLog,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -r1.151 -r1.152
--- ChangeLog 20 Feb 2002 22:52:31 -0000 1.151
+++ ChangeLog 20 Feb 2002 23:19:53 -0000 1.152
@@ -3,6 +3,8 @@
* FilterParser.py (FilterParser.read): Partially restore old
behavior: allow missing filter files, but not IOErrors.
+ (FilterParser.firstmatch): Correct Python2.2isms.
+
2002-02-20 Tim Legant <tim@xxxxxxxxxxx>
* FilterParser.py (Error): Moved __repr__ and __str__ to
Index: FilterParser.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/FilterParser.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- FilterParser.py 20 Feb 2002 23:03:13 -0000 1.23
+++ FilterParser.py 20 Feb 2002 23:19:53 -0000 1.24
@@ -418,7 +418,7 @@
if source in ('from-file', 'to-file'):
match = os.path.expanduser(match)
valid_cdb = 0
- if 'autocdb' in args:
+ if args.has_key('autocdb'):
cdbname = match + '.cdb'
# If the text file doesn't exist, let the exception
# happen and get passed back to tmda-filter.
@@ -533,7 +533,7 @@
else:
content = None
re_flags = re.MULTILINE
- if 'case' not in args:
+ if not args.has_key('case'):
re_flags = re_flags | re.IGNORECASE
if content and re.search(match,content,re_flags):
found_match = 1
@@ -548,7 +548,7 @@
else:
content = None
re_flags = re.MULTILINE
- if 'case' not in args:
+ if not args.has_key('case'):
re_flags = re_flags | re.IGNORECASE
for line in match_list:
mo = self.matches.match(line)
_______________________________________________
tmda-cvs mailing list
http://libertine.org/lists/listinfo/tmda-cvs
|