diff options
author | diosmosis <benaka.moorthi@gmail.com> | 2013-04-18 10:23:00 +0400 |
---|---|---|
committer | diosmosis <benaka.moorthi@gmail.com> | 2013-04-18 10:23:00 +0400 |
commit | bf2fdd4aa997fbae4ad7ade43d383f7947afe77c (patch) | |
tree | b72c329bd50e1b1065eb360906e4c18391af07a0 /misc | |
parent | 98658d02b90f18a29ea62a1a11ca67866237240f (diff) |
Fixes #3832, add --force-lowercase-path option to log importer script that makes all paths lowercase before importing hits.
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/log-analytics/import_logs.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py index 3be72a186c..b7012449e0 100755 --- a/misc/log-analytics/import_logs.py +++ b/misc/log-analytics/import_logs.py @@ -399,6 +399,11 @@ class Configuration(object): help="Invalidate reports for the specified dates (format: YYYY-MM-DD,YYYY-MM-DD,...). " "By default, all dates found in the logs will be invalidated.", ) + option_parser.add_option( + '--force-lowercase-path', dest='force_lowercase_path', default=False, action='store_true', + help="Make URL path lowercase so paths with the same letters but different cases are " + "treated the same." + ) return option_parser @@ -1225,6 +1230,9 @@ class Hit(object): for key, value in kwargs.iteritems(): setattr(self, key, value) super(Hit, self).__init__() + + if config.options.force_lowercase_path: + self.full_path = self.full_path.lower() class Parser(object): |