file: Remove unused gzip enum
This commit is contained in:
+2
-8
@@ -52,12 +52,11 @@ class InvalidSignature(pisi.Error):
|
|||||||
class File:
|
class File:
|
||||||
|
|
||||||
(read, write) = range(2) # modes
|
(read, write) = range(2) # modes
|
||||||
(xz, bz2, gzip, auto) = range(4) # compress enums
|
(xz, bz2, auto) = range(3) # compress enums
|
||||||
(detached, whatelse) = range(2)
|
(detached, whatelse) = range(2)
|
||||||
|
|
||||||
__compressed_file_extensions = {".xz": xz,
|
__compressed_file_extensions = {".xz": xz,
|
||||||
".bz2": bz2,
|
".bz2": bz2}
|
||||||
".gz": gzip}
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def make_uri(uri):
|
def make_uri(uri):
|
||||||
@@ -94,8 +93,6 @@ class File:
|
|||||||
import bz2
|
import bz2
|
||||||
open(localfile[:-4], "w").write(bz2.BZ2File(localfile).read())
|
open(localfile[:-4], "w").write(bz2.BZ2File(localfile).read())
|
||||||
localfile = localfile[:-4]
|
localfile = localfile[:-4]
|
||||||
elif compress == File.gzip:
|
|
||||||
raise Error(_("zip compression not supported yet"))
|
|
||||||
return localfile
|
return localfile
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@@ -202,9 +199,6 @@ class File:
|
|||||||
compressed_file = self.localfile + ".bz2"
|
compressed_file = self.localfile + ".bz2"
|
||||||
bz2.BZ2File(compressed_file, "w").write(open(self.localfile, "r").read())
|
bz2.BZ2File(compressed_file, "w").write(open(self.localfile, "r").read())
|
||||||
|
|
||||||
elif self.compress == File.gzip:
|
|
||||||
raise Error(_("gzip compression not supported yet"))
|
|
||||||
|
|
||||||
if self.sha1sum:
|
if self.sha1sum:
|
||||||
sha1 = pisi.util.sha1_file(self.localfile)
|
sha1 = pisi.util.sha1_file(self.localfile)
|
||||||
cs = file(self.localfile + '.sha1sum', 'w')
|
cs = file(self.localfile + '.sha1sum', 'w')
|
||||||
|
|||||||
Reference in New Issue
Block a user