~vomun-developers/anonplus/vomun-trunk

« back to all changes in this revision

Viewing changes to src/setup.py

  • Committer: AJ00200
  • Date: 2011-11-21 04:10:32 UTC
  • Revision ID: git-v1:147e744b0c32a8046b48296d23ce24c4099c7759
Added a quick try block to catch an error from bug 892944

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
print('     this could take a while...')
54
54
 
55
55
# ####################################
56
 
# TODO: do non-symbolic key generation
 
56
# Generate the node-key for the user
57
57
# ####################################
58
 
keys['nodekey'] = Crypto.PublicKey.RSA.generate(2048)
59
 
keys['nodekey'].hash = hashlib.sha256(
60
 
        keys['nodekey'].publickey().exportKey()).hexdigest()
 
58
try:
 
59
    keys['nodekey'] = Crypto.PublicKey.RSA.generate(2048)
 
60
    keys['nodekey'].hash = hashlib.sha256(
 
61
            keys['nodekey'].publickey().exportKey()).hexdigest()
 
62
except AttributeError:
 
63
    pass # Waiting for input from the PyCrypto people
61
64
 
62
65
print('  [*] Done. Key fingerprint:')
63
66
print('      %s' % keys['nodekey'].hash)
68
71
print('     this could take a while...')
69
72
 
70
73
# ####################################
71
 
# TODO: do non-symbolic key generation
 
74
# Generate the user-key for the user
72
75
# ####################################
73
76
keys['userkey'] = Crypto.PublicKey.RSA.generate(2048)
74
77
keys['userkey'].hash = hashlib.sha256(