|
|
|
@ -47,6 +47,7 @@ from calculate.lib.utils.text import _u8
|
|
|
|
|
from calculate.lib.variables.linux import LinuxDataVars, Linux
|
|
|
|
|
|
|
|
|
|
from calculate.lib.cl_lang import setLocalTranslate, _
|
|
|
|
|
from functools import reduce
|
|
|
|
|
|
|
|
|
|
setLocalTranslate('cl_install3', sys.modules[__name__])
|
|
|
|
|
|
|
|
|
@ -319,10 +320,10 @@ class Distributive(object):
|
|
|
|
|
return False
|
|
|
|
|
os.mkdir(pathname)
|
|
|
|
|
return True
|
|
|
|
|
except Exception, e:
|
|
|
|
|
except Exception as e:
|
|
|
|
|
raise DistributiveError(_("Failed to create the directory") +
|
|
|
|
|
" '%s':\n%s" % (pathname, str(e)))
|
|
|
|
|
except KeyboardInterrupt, e:
|
|
|
|
|
except KeyboardInterrupt as e:
|
|
|
|
|
raise DistributiveError(_("Failed to create the directory") +
|
|
|
|
|
" '%s':\n%s" % (pathname, str(e)))
|
|
|
|
|
|
|
|
|
@ -356,10 +357,10 @@ class Distributive(object):
|
|
|
|
|
def _copytree(self, indir, outdir):
|
|
|
|
|
try:
|
|
|
|
|
copytree(indir, outdir, symlinks=True)
|
|
|
|
|
except Exception, e:
|
|
|
|
|
except Exception as e:
|
|
|
|
|
raise DistributiveError(_("Failed to copy") + " '%s' to '%s':\n%s" \
|
|
|
|
|
% (indir, outdir, str(e)))
|
|
|
|
|
except KeyboardInterrupt, e:
|
|
|
|
|
except KeyboardInterrupt as e:
|
|
|
|
|
raise DistributiveError(_("Failed to copy") + " '%s' to '%s':\n%s" \
|
|
|
|
|
% (indir, outdir, str(e)))
|
|
|
|
|
|
|
|
|
@ -399,7 +400,7 @@ class Distributive(object):
|
|
|
|
|
path.join(todir, copyfile)):
|
|
|
|
|
if callbackProgress:
|
|
|
|
|
callbackProgress(recountPerc(perc, i))
|
|
|
|
|
except Exception, e:
|
|
|
|
|
except Exception as e:
|
|
|
|
|
res = False
|
|
|
|
|
errmes = str(e)
|
|
|
|
|
if not res:
|
|
|
|
|