Version 4.0 - first draft for Python3 conversion

This commit is contained in:
Ciro Mattia Gonano
2013-11-14 15:49:46 +01:00
parent ddd223c2ec
commit d33c53b691
19 changed files with 210 additions and 191 deletions
+4 -4
View File
@@ -21,7 +21,7 @@ __docformat__ = 'restructuredtext en'
import os
import zipfile
import rarfile
from . import rarfile
import locale
from subprocess import STDOUT, PIPE
from psutil import Popen
@@ -52,7 +52,7 @@ class CBxArchive:
elif f.endswith('/'):
try:
os.makedirs(os.path.join(targetdir, f))
except StandardError:
except Exception:
pass # the dir exists so we are going to extract the images only.
else:
filelist.append(f)
@@ -67,7 +67,7 @@ class CBxArchive:
elif f.endswith('/'):
try:
os.makedirs(os.path.join(targetdir, f))
except StandardError:
except Exception:
pass # the dir exists so we are going to extract the images only.
else:
filelist.append(f.encode(locale.getpreferredencoding()))
@@ -85,7 +85,7 @@ class CBxArchive:
raise OSError
def extract(self, targetdir):
print "\n" + targetdir + "\n"
print("\n" + targetdir + "\n")
if self.compressor == 'rar':
self.extractCBR(targetdir)
elif self.compressor == 'zip':