remove dependency on warnings module
authorForrest Voight <forrest@forre.st>
Sun, 31 Jul 2011 17:24:48 +0000 (13:24 -0400)
committerForrest Voight <forrest@forre.st>
Sun, 31 Jul 2011 17:24:48 +0000 (13:24 -0400)
p2pool/bitcoin/data.py

index e7e6165..fce4ae2 100644 (file)
@@ -1,8 +1,7 @@
 from __future__ import division
 
-import struct
 import hashlib
-import warnings
+import struct
 
 from . import base58, skiplists
 from p2pool.util import bases, math, skiplist
@@ -169,7 +168,7 @@ class HashType(Type):
         if not 0 <= item < 2**256:
             raise ValueError('invalid hash value - %r' % (item,))
         if item != 0 and item < 2**160:
-            warnings.warn('very low hash value - maybe you meant to use ShortHashType? %x' % (item,))
+            print 'Very low hash value - maybe you meant to use ShortHashType? %x' % (item,)
         return file, ('%064x' % (item,)).decode('hex')[::-1]
 
 class ShortHashType(Type):