diff options
author | Colin Dunklau <colin.dunklau@gmail.com> | 2013-05-12 21:44:04 -0500 |
---|---|---|
committer | Colin Dunklau <colin.dunklau@gmail.com> | 2013-05-12 21:44:04 -0500 |
commit | de9d6993b2e506dac3c40e7f4f3ea4ceb5cddfd6 (patch) | |
tree | b693ce6b5f085cfe93536b921b19555d3fad3836 /jsonschema | |
parent | 7cea7cc3f53390b049310fda30964c3075f0144a (diff) | |
download | jsonschema-de9d6993b2e506dac3c40e7f4f3ea4ceb5cddfd6.tar.gz |
Fixed loading problem for schema json
Diffstat (limited to 'jsonschema')
-rw-r--r-- | jsonschema/_utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/jsonschema/_utils.py b/jsonschema/_utils.py index 7e748cb..10e7bf8 100644 --- a/jsonschema/_utils.py +++ b/jsonschema/_utils.py @@ -43,7 +43,10 @@ def load_schema(name): Load a schema from ./schemas/``name``.json and return it. """ - schemadir = os.path.join(os.path.dirname(__file__), 'schemas') + schemadir = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + 'schemas' + ) schemapath = os.path.join(schemadir, '%s.json' % (name,)) with open(schemapath) as f: return json.load(f) |