Ottomata has submitted this change and it was merged. Change subject: Fixing JsonLogster bug when keys contain '/' ......................................................................
Fixing JsonLogster bug when keys contain '/' Change-Id: I2acdbd86584ce4b5edb085ad97106bfd9a7f8701 --- M logster/parsers/JsonLogster.py 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/logster/parsers/JsonLogster.py b/logster/parsers/JsonLogster.py index 836c9ca..a228f64 100644 --- a/logster/parsers/JsonLogster.py +++ b/logster/parsers/JsonLogster.py @@ -32,7 +32,7 @@ optparser = optparse.OptionParser() optparser.add_option('--key-separator', '-k', dest='key_separator', default='.', - help='Key separator for flattened json object key name. Default: \'.\'') + help='Key separator for flattened json object key name. Default: \'.\' \'/\' is not allowed.''') opts, args = optparser.parse_args(args=options) self.key_separator = opts.key_separator @@ -71,6 +71,10 @@ key = key_filter_callback(key) if key is False: continue + # '/' is not allowed in key names. + # Ganglia writes files based on key names + # and doesn't escape these in the path. + key = key.replace('/', self.key_separator) if hasattr(child, '__iter__'): # merge the child items all together -- To view, visit https://gerrit.wikimedia.org/r/99537 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2acdbd86584ce4b5edb085ad97106bfd9a7f8701 Gerrit-PatchSet: 2 Gerrit-Project: operations/debs/logster Gerrit-Branch: master Gerrit-Owner: Ottomata <o...@wikimedia.org> Gerrit-Reviewer: Ottomata <o...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits