From: Joshua Kugler Date: Wed, 22 Jun 2011 04:34:07 +0000 (-0800) Subject: Use the new format_to_name dict X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d924a81cc87e2a9989c1e1c54545cc81933e2ccd;p=apachelog.git Use the new format_to_name dict --- diff --git a/apachelog.py b/apachelog.py index 021b00e..4bab6e3 100755 --- a/apachelog.py +++ b/apachelog.py @@ -290,7 +290,10 @@ class parser: Takes and returns a string fieldname """ - return name + try: + return self.format_to_name[name] + except KeyError: + return name def pattern(self): """