changeset 1003:4c341ec05420

Renamed SEED to VIFF_SEED.
author Martin Geisler <mg@daimi.au.dk>
date Fri, 24 Oct 2008 13:00:29 +0200
parents 735d5e3dade2
children 26d6cdcbd677
files NEWS viff/util.py
diffstat 2 files changed, 12 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Wed Oct 15 09:44:48 2008 +0200
+++ b/NEWS	Fri Oct 24 13:00:29 2008 +0200
@@ -12,6 +12,11 @@
 
   http://tracker.viff.dk/
 
+Next version, not yet released
+------------------------------
+
+* Renamed random seed environment variable from SEED to VIFF_SEED.
+
 
 Version 0.7.1, released on 2008-10-09
 -------------------------------------
--- a/viff/util.py	Wed Oct 15 09:44:48 2008 +0200
+++ b/viff/util.py	Fri Oct 24 13:00:29 2008 +0200
@@ -32,7 +32,7 @@
 from gmpy import mpz
 
 #: Seed for :data:`rand`.
-_seed = os.environ.get('SEED')
+_seed = os.environ.get('VIFF_SEED')
 
 if _seed is None:
     # If the environment variable is not set, then a random seed is
@@ -42,14 +42,14 @@
     #: Random number generator used by all VIFF code.
     #:
     #: The generator is by default initialized with a random seed,
-    #: unless the environment variable :envvar:`SEED` is set to a value, in
-    #: which case that value is used instead. If :envvar:`SEED` is defined,
-    #: but empty, then no seed is used and a protocol cannot be
-    #: reproduced exactly.
+    #: unless the environment variable :envvar:`VIFF_SEED` is set to a
+    #: value, in which case that value is used instead. If
+    #: :envvar:`VIFF_SEED` is defined, but empty, then no seed is used
+    #: and a protocol cannot be reproduced exactly.
     rand = random.Random(_seed)
 elif _seed == '':
-    # If it is set, but set to the empty string (SEED=), then no seed
-    # is used.
+    # If it is set, but set to the empty string (VIFF_SEED=), then no
+    # seed is used.
     rand = random.SystemRandom()
 else:
     # Otherwise use the seed given, which must be an integer.