rename compression method name sevenzip -> lzma
This commit is contained in:
+5
-5
@@ -54,7 +54,7 @@ class InvalidSignature(pisi.Error):
|
|||||||
class File:
|
class File:
|
||||||
|
|
||||||
(read, write) = range(2) # modes
|
(read, write) = range(2) # modes
|
||||||
(bz2, sevenzip) = range(2) # compress enums
|
(bz2, lzma) = range(2) # compress enums
|
||||||
|
|
||||||
(detached, whatelse) = range(2)
|
(detached, whatelse) = range(2)
|
||||||
|
|
||||||
@@ -76,8 +76,8 @@ class File:
|
|||||||
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.sevenzip:
|
elif compress == File.lzma:
|
||||||
raise Error(_("sevenzip compression not supported yet"))
|
raise Error(_("lzma compression not supported yet"))
|
||||||
|
|
||||||
return localfile
|
return localfile
|
||||||
|
|
||||||
@@ -167,8 +167,8 @@ 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.sevenzip:
|
elif self.compress == File.lzma:
|
||||||
raise Error(_("sevenzip compression not supported yet"))
|
raise Error(_("lzma compression not supported yet"))
|
||||||
|
|
||||||
if self.sha1sum:
|
if self.sha1sum:
|
||||||
sha1 = pisi.util.sha1_file(self.localfile)
|
sha1 = pisi.util.sha1_file(self.localfile)
|
||||||
|
|||||||
Reference in New Issue
Block a user