# HG changeset patch # User Goffi # Date 1307212370 -7200 # Node ID 97384a79043dd09f27a7e7a8cf62a6b59e9f9db8 # Parent 07e4c8f96a6e7764cdf5b0c39170b97232356d37 fixed crash when a source dir can't be accessed diff -r 07e4c8f96a6e -r 97384a79043d gcp --- a/gcp Sat Jun 04 19:45:30 2011 +0200 +++ b/gcp Sat Jun 04 20:32:50 2011 +0200 @@ -272,7 +272,12 @@ else: self.__appendToList(filepath, dest_path, options) except OSError,e: - error(_("Can't append %(path)s to copy list: %(exception)s") % {'path':filepath.decode('utf-8','replace'), + try: + error(_("Can't append %(path)s to copy list: %(exception)s") % {'path':filepath.decode('utf-8','replace'), + 'exception':e.strerror}) + except NameError: + #We can't list the dir + error(_("Can't access %(dirpath)s: %(exception)s") % {'dirpath':dirpath.decode('utf-8','replace'), 'exception':e.strerror}) def __checkArgs(self, options, source_path, args):