Add comment for e.path schema validation fix

Add comment for e.path in schema validation and use popleft()
This commit is contained in:
imdadahad
2016-12-16 12:41:19 +00:00
committed by GitHub
parent 243c4e481f
commit 27952e96e0

View File

@@ -45,7 +45,9 @@ def __format_message(e):
def get_path(e):
error_path = None
try:
error_path = e.path[0]
error_path = e.path.popleft()
# no need to catch IndexError exception explicity as
# error_path is None if e.path has no items
finally:
return error_path