Skip to content

Commit

Permalink
Merge pull request #85 from IIIF/fix_unhandle_errors
Browse files Browse the repository at this point in the history
Fixing a missing type in info.json
  • Loading branch information
glenrobson committed Jan 27, 2020
2 parents 54f32f8 + f47d818 commit bbb3050
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -5,6 +5,7 @@ python:
- "3.6"
install:
- pip install tox tox-travis coveralls
- pip install setuptools -U
- python setup.py install
script:
- tox
Expand Down
2 changes: 1 addition & 1 deletion iiif_validator/tests/info_json.py
Expand Up @@ -81,7 +81,7 @@ def run(self, result):
self.validationInfo.check('type-is-int: width', type(t['width']), int, result)
# extra version 3.0 checks
if result.version[0] == "3":
self.validationInfo.check('correct-type', info['type'], "ImageService3", result, "Info.json missing required type of ImageService3.")
self.validationInfo.check('correct-type', 'type' in info and info['type'], "ImageService3", result, "Info.json missing required type of ImageService3.")
self.validationInfo.check('license-renamed', 'license' in info, False, result,'license has been renamed rights in 3.0',warning=True)
if 'rights' in info:
self.validationInfo.check('type-is-uri: rights', info['rights'].startswith('http'), True, result,'Rights should be a single URI from Creative Commons, RightsStatements.org or URIs registered as extensions.')
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
@@ -1,5 +1,6 @@
lxml
bottle
python-magic
pillow
# Versions including 7 don't support python 2.x
pillow<7
mock
5 changes: 4 additions & 1 deletion setup.py
Expand Up @@ -43,10 +43,13 @@
long_description=open('README').read(),
url='http://github.com/IIIF/image-api',
install_requires=[
"Pillow>=3.2.0",
"bottle>=0.12.1",
"python-magic>=0.4.12",
"lxml>=3.7.0"
],
extras_require={
':python_version>="3.0"': ["Pillow>=3.2.0"],
':python_version<"3.0"': ["Pillow==6.2.2"],
},
test_suite="tests",
tests_require=["mock"])

0 comments on commit bbb3050

Please sign in to comment.