added updated version of oauthlib
[twitter-api-cdsw] / oauthlib / oauth1 / rfc5849 / signature.py
index f57d80a8df31e953e72b976c0cc4f44edbb86417..8fa22baf7566493f29aaa47777aceeb481645799 100644 (file)
@@ -500,6 +500,8 @@ def sign_rsa_sha1(base_string, rsa_private_key):
 
 
 def sign_rsa_sha1_with_client(base_string, client):
+    if not client.rsa_key:
+        raise ValueError('rsa_key is required when using RSA signature method.')
     return sign_rsa_sha1(base_string, client.rsa_key)
 
 

Benjamin Mako Hill || Want to submit a patch?