Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions jsonpatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def __init__(self, operation, pointer_cls=JsonPointer):
self.location = operation['path']
try:
self.pointer = self.pointer_cls(self.location)
except TypeError as ex:
except TypeError:
raise InvalidJsonPatch("Invalid 'path'")

self.operation = operation
Expand Down Expand Up @@ -246,7 +246,7 @@ def apply(self, obj):

try:
del subobj[part]
except (KeyError, IndexError) as ex:
except (KeyError, IndexError):
msg = "can't remove a non-existent object '{0}'".format(part)
raise JsonPatchConflict(msg)

Expand Down Expand Up @@ -275,7 +275,7 @@ class AddOperation(PatchOperation):
def apply(self, obj):
try:
value = self.operation["value"]
except KeyError as ex:
except KeyError:
raise InvalidJsonPatch(
"The operation does not contain a 'value' member")

Expand Down Expand Up @@ -327,7 +327,7 @@ class ReplaceOperation(PatchOperation):
def apply(self, obj):
try:
value = self.operation["value"]
except KeyError as ex:
except KeyError:
raise InvalidJsonPatch(
"The operation does not contain a 'value' member")

Expand Down Expand Up @@ -372,7 +372,7 @@ def apply(self, obj):
from_ptr = self.operation['from']
else:
from_ptr = self.pointer_cls(self.operation['from'])
except KeyError as ex:
except KeyError:
raise InvalidJsonPatch(
"The operation does not contain a 'from' member")

Expand Down Expand Up @@ -464,7 +464,7 @@ def apply(self, obj):

try:
value = self.operation['value']
except KeyError as ex:
except KeyError:
raise InvalidJsonPatch(
"The operation does not contain a 'value' member")

Expand All @@ -482,7 +482,7 @@ class CopyOperation(PatchOperation):
def apply(self, obj):
try:
from_ptr = self.pointer_cls(self.operation['from'])
except KeyError as ex:
except KeyError:
raise InvalidJsonPatch(
"The operation does not contain a 'from' member")

Expand Down