[Apt-offline-devel] [SCM] Offline APT Package Manager branch, master, updated. 0.9.5-19-g2b1fdf4

Ritesh Raj Sarraf rrs at researchut.com
Tue Dec 8 10:50:18 UTC 2009


The following commit has been merged in the master branch:
commit 59646b64c7791c8df938ad29f1fb3ec9b042226b
Author: Ritesh Raj Sarraf <rrs at researchut.com>
Date:   Thu Dec 3 21:26:25 2009 +0530

    Temporarily handle "IOError: invalid data stream"
    
    Seems like urllib2 is not doing the best of the jobs when downloading
    data over a very slow network.
    I am not very sure as to what would be causing an "invalid data stream"
    corruption of the data.
    Is it something wrong at my end ? Or something wrong that Python is
    doing? Or maybe something just plain wrong with the network ?
    
    Needs investigation.

diff --git a/AptOfflineLib.py b/AptOfflineLib.py
index d35ed72..ee0c98b 100644
--- a/AptOfflineLib.py
+++ b/AptOfflineLib.py
@@ -348,6 +348,10 @@ class Archiver:
                         TargetFileHandle.write( SourceFileHandle.read() )
                 except EOFError:
                         pass
+                except IOError:
+                        #TODO: What constitutes an "IOError: invalid data stream" ???
+                        # Couldn't find much from the docs. Needs to be investigated.
+                        return False
                 return True
         
         def compress_the_file( self, zip_file_name, files_to_compress ):

-- 
Offline APT Package Manager



More information about the Apt-offline-devel mailing list