diff options
Diffstat (limited to 'libs/resource.py')
| -rw-r--r-- | libs/resource.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/libs/resource.py b/libs/resource.py deleted file mode 100644 index f521022..0000000 --- a/libs/resource.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python - -from os import path -import json, jsonschema - - -class Resource: - def __init__(self, resource): - self.resource=resource - # Read data - try: - with open(resource,'r') as f: - self.data=f.read() - except IOError: - print("Unable to found "+resource) - exit(1) - # Decode data - try: - self.json=json.loads(self.data) - except: - print("Unable to read json from "+resource) - exit(1) - |
