Initialize PyCrypto's RNG (We don't actually use the RNG, but this should prevent certain errors if libcloud is running in a fork of an application that has already imported the Crypto library.)
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/0b9b7deb Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/0b9b7deb Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/0b9b7deb Branch: refs/heads/trunk Commit: 0b9b7deb728f706405d412f2874350b10a5a4f6f Parents: fc59dd8 Author: Rick Wright <[email protected]> Authored: Mon Dec 16 15:52:19 2013 -0800 Committer: Rick Wright <[email protected]> Committed: Mon Dec 16 15:52:19 2013 -0800 ---------------------------------------------------------------------- libcloud/common/google.py | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/0b9b7deb/libcloud/common/google.py ---------------------------------------------------------------------- diff --git a/libcloud/common/google.py b/libcloud/common/google.py index 549ba8b..da3b66d 100644 --- a/libcloud/common/google.py +++ b/libcloud/common/google.py @@ -82,6 +82,8 @@ try: from Crypto.Hash import SHA256 from Crypto.PublicKey import RSA from Crypto.Signature import PKCS1_v1_5 + import Crypto.Random + Crypto.Random.atfork() except ImportError: # The pycrypto library is unavailable SHA256 = None
