Skip to content

Commit a66eb45

Browse files
committed
Fix indentation.
1 parent f0bf58c commit a66eb45

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

jsonschema/_format.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,19 @@ def check(self, instance, format):
6464
6565
"""
6666

67-
if format in self.checkers:
68-
func, raises = self.checkers[format]
69-
result, cause = None, None
70-
try:
71-
result = func(instance)
72-
except raises as e:
73-
cause = e
74-
if not result:
75-
raise FormatError(
76-
"%r is not a %r" % (instance, format), cause=cause,
77-
)
67+
if format not in self.checkers:
68+
return
69+
70+
func, raises = self.checkers[format]
71+
result, cause = None, None
72+
try:
73+
result = func(instance)
74+
except raises as e:
75+
cause = e
76+
if not result:
77+
raise FormatError(
78+
"%r is not a %r" % (instance, format), cause=cause,
79+
)
7880

7981
def conforms(self, instance, format):
8082
"""

0 commit comments

Comments
 (0)