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...
jjmaestro committed Aug 22, 2012
1 parent 7e677bb commit ff2eacb2a5f5a22dcaf1888b7476584d8fbc09be
Showing with 0 additions and 2 deletions.
  1. +0 −2 facepy/
@@ -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.