Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Database:
- def __init__(self):
- pass
- @classmethod
- def get_json(cls, dbname):
- filename = dbname + '.json'
- data = open(filename, 'r')
- try:
- j = json.load(data)
- except Exception:
- print('Warning: ' + filename + ' is not found.')
- return j
Add Comment
Please, Sign In to add comment