From d924a81cc87e2a9989c1e1c54545cc81933e2ccd Mon Sep 17 00:00:00 2001 From: Joshua Kugler Date: Tue, 21 Jun 2011 20:34:07 -0800 Subject: [PATCH] Use the new format_to_name dict --- apachelog.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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): """ -- 2.26.2