SVN: ZODB/trunk/src/ZODB/utils.py Removed a print statement. Getting class meta data from a pickle

Jim Fulton <[email protected]>
Newsgroups gmane.comp.python.zope.zodb.cvs
Message-ID <[email protected]>
Log message for revision 112461:
  Removed a print statement.  Getting class meta data from a pickle
  can fail if the pickle has been transformed and a calling storage
  doesn't account for that.  Printing is certainly not the right way to
  deal with the problem.
  
  Also cleaned up some whitespace.
  

Changed:
  U   ZODB/trunk/src/ZODB/utils.py

-=-
Modified: ZODB/trunk/src/ZODB/utils.py
===================================================================
--- ZODB/trunk/src/ZODB/utils.py	2010-05-18 15:22:09 UTC (rev 112460)
+++ ZODB/trunk/src/ZODB/utils.py	2010-05-18 15:22:11 UTC (rev 112461)
@@ -87,10 +87,10 @@
 
 def cp(f1, f2, length=None):
     """Copy all data from one file to another.
-    
+
     It copies the data from the current position of the input file (f1)
-    appending it to the current position of the output file (f2). 
-    
+    appending it to the current position of the output file (f2).
+
     It copies at most 'length' bytes. If 'length' isn't given, it copies
     until the end of the input file.
     """
@@ -103,7 +103,7 @@
         f1.seek(0,2)
         length = f1.tell()
         f1.seek(old_pos)
-    
+
     while length > 0:
         if n > length:
             n = length
@@ -206,7 +206,6 @@
     try:
         class_info = u.load()
     except Exception, err:
-        print "Error", err
         return '', ''
     if isinstance(class_info, tuple):
         if isinstance(class_info[0], tuple):
@@ -251,7 +250,7 @@
                     raise AssertionError(
                         "Failed precondition: ",
                         precondition.__doc__.strip())
-            
+
             return func(*args, **kw)
         finally:
             inst._lock_release()
@@ -269,4 +268,4 @@
 
     def __call__(self, func):
         return Locked(func, preconditions=self.preconditions)
-        
+
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.