Skip to content
Browse files

Deleting dead code

After extensive manual testing of corner cases in that part of the code,
I think that the IndexError exception cannot be reached in that code.
All the exceptions that can be thrown in that try-except are TypeError
and ValueError.
  • Loading branch information...
1 parent 7e677bb commit ff2eacb2a5f5a22dcaf1888b7476584d8fbc09be @jjmaestro jjmaestro committed
Showing with 0 additions and 2 deletions.
  1. +0 −2 facepy/signed_request.py
View
2 facepy/signed_request.py
@@ -77,8 +77,6 @@ def decode(encoded):
encoded_signature, encoded_payload = (str(string) for string in signed_request.split('.', 2))
signature = decode(encoded_signature)
signed_request_data = json.loads(decode(encoded_payload))
- except IndexError:
- raise SignedRequestError("Signed request malformed")
except (TypeError, ValueError):
raise SignedRequestError("Signed request had a corrupted payload")

0 comments on commit ff2eacb

Please sign in to comment.
Something went wrong with that request. Please try again.