raise exception if the method is used to overwrite the existing seed
authorThomasV <thomasv@gitorious>
Sun, 3 Feb 2013 14:12:40 +0000 (15:12 +0100)
committerThomasV <thomasv@gitorious>
Sun, 3 Feb 2013 14:12:40 +0000 (15:12 +0100)
lib/wallet.py

index 9efc814..817f206 100644 (file)
@@ -142,6 +142,7 @@ class Wallet:
         
 
     def init_seed(self, seed):
+        if self.seed: raise BaseException("a seed exists")
         if not seed: 
             seed = "%032x"%ecdsa.util.randrange( pow(2,128) ) 
         self.seed = seed