summaryrefslogtreecommitdiff
path: root/jsonschema
diff options
context:
space:
mode:
authorColin Dunklau <colin.dunklau@gmail.com>2013-05-12 21:44:04 -0500
committerColin Dunklau <colin.dunklau@gmail.com>2013-05-12 21:44:04 -0500
commitde9d6993b2e506dac3c40e7f4f3ea4ceb5cddfd6 (patch)
treeb693ce6b5f085cfe93536b921b19555d3fad3836 /jsonschema
parent7cea7cc3f53390b049310fda30964c3075f0144a (diff)
downloadjsonschema-de9d6993b2e506dac3c40e7f4f3ea4ceb5cddfd6.tar.gz
Fixed loading problem for schema json
Diffstat (limited to 'jsonschema')
-rw-r--r--jsonschema/_utils.py5
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)