/usr/lib/python2.7/dist-packages/chartkick/options.py is in python-chartkick 0.5.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | from __future__ import absolute_import
import json
import logging
class Options(dict):
def __init__(self, *args, **kwargs) :
dict.__init__(self, *args, **kwargs)
def load(self, filename):
with open(filename) as jsonfile:
options = json.loads(jsonfile.read())
self.clear()
for option in options:
id = option.get('id', None)
if id is None:
logging.warning("Missing chart 'id' in %s" % option)
continue
self.update({id: option})
|