diff options
author | Guido van Rossum <guido@python.org> | 1995-06-21 02:08:55 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-06-21 02:08:55 (GMT) |
commit | 541df3e99e924540097ceb7761a6e423486da652 (patch) | |
tree | 5dad96a58d1e0c7c9eeebf50e5b18ff65e10b441 /Demo/pdist/security.py | |
parent | d1972af22aa9b3d7d4b50bf9a04211d9ddfa2fec (diff) | |
download | cpython-541df3e99e924540097ceb7761a6e423486da652.zip cpython-541df3e99e924540097ceb7761a6e423486da652.tar.gz cpython-541df3e99e924540097ceb7761a6e423486da652.tar.bz2 |
bugfixes
Diffstat (limited to 'Demo/pdist/security.py')
-rwxr-xr-x | Demo/pdist/security.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Demo/pdist/security.py b/Demo/pdist/security.py index 29bc945..a11294a 100755 --- a/Demo/pdist/security.py +++ b/Demo/pdist/security.py @@ -5,10 +5,10 @@ class Security: env = os.environ if env.has_key('PYTHON_KEYFILE'): keyfile = env['PYTHON_KEYFILE'] - elif env.has_key('HOME'): - keyfile = env['HOME'] + '.python_keyfile' else: keyfile = '.python_keyfile' + if env.has_key('HOME'): + keyfile = os.path.join(env['HOME'], keyfile) try: self._key = eval(open(keyfile).readline()) except IOError: @@ -23,4 +23,4 @@ class Security: def _encode_challenge(self, challenge): p, m = self._key - return pow(challenge, p, m) + return pow(long(challenge), p, m) |