Commit a800e379 authored by Seblu's avatar Seblu
Browse files

Fix unable to extract file from a remote directory

This fix is a workaround taking a class gzipstream from redhat (GPL2)
which allow gzip class to be not seekable.
Since python 3.2, gzip module is now not seekable. Until we swith to version
we should use this hack
parent 1214b100
Loading
Loading
Loading
Loading
+629

File added.

Preview size limit exceeded, changes collapsed.

+2 −2
Changes for installsystems/image.py: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ import tarfile
import re
import cStringIO
import shutil
import gzip
import gzipstream #until python support gzip not seekable
import installsystems.template as istemplate
import installsystems.tools as istools
from installsystems.printer import *
@@ -784,7 +784,7 @@ class Payload(object):
        # try to open payload file
        try:
            f_gsrc = istools.uopen(self.path)
            f_src = gzip.GzipFile(fileobj=f_gsrc)
            f_src = gzipstream.GzipStream(stream=f_gsrc)
        except Exception as e:
            raise Exception("Unable to open payload file %s" % self.path)
        # launch copy