fixed possible crash introduced by prior commit
authorForrest Voight <forrest@forre.st>
Mon, 20 Jan 2014 07:58:25 +0000 (02:58 -0500)
committerForrest Voight <forrest@forre.st>
Mon, 20 Jan 2014 07:58:25 +0000 (02:58 -0500)
p2pool/data.py

index 7c44878..e8fe347 100644 (file)
@@ -430,7 +430,7 @@ class OkayTracker(forest.Tracker):
         try:
             share.check(self)
         except:
-            log.err(None, 'Share check failed: %064x -> %064x' % (share.hash, share.previous_hash))
+            log.err(None, 'Share check failed: %064x -> %064x' % (share.hash, share.previous_hash if share.previous_hash is not None else 0))
             return False
         else:
             self.verified.add(share)