~jflaker/duplicity/BugFix1325215

« back to all changes in this revision

Viewing changes to duplicity/backends/_cf_cloudfiles.py

  • Committer: Kenneth Loafman
  • Date: 2014-04-30 11:37:10 UTC
  • mfrom: (981.1.1 encode)
  • Revision ID: kenneth@loafman.com-20140430113710-cs51mjoz1j5ybjys
* Merged in lp:~mterry/duplicity/encode-exceptions
  - Because exceptions often contain file paths, they have the same problem
    with Python 2.x's implicit decoding using the 'ascii' encoding that we've
    experienced before.  So I added a new util.uexc() method that uses the
    util.ufn() method to convert an exception to a unicode string and used it
    around the place.
  - Bugs fixed: 1289288, 1311176, 1313966

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
import duplicity.backend
24
24
from duplicity import log
 
25
from duplicity import util
25
26
from duplicity.errors import BackendException
26
27
 
27
28
class CloudFilesBackend(duplicity.backend.Backend):
61
62
            conn = Connection(**conn_kwargs)
62
63
        except Exception as e:
63
64
            log.FatalError("Connection failed, please check your credentials: %s %s"
64
 
                           % (e.__class__.__name__, str(e)),
 
65
                           % (e.__class__.__name__, util.uexc(e)),
65
66
                           log.ErrorCode.connection_failed)
66
67
        self.container = conn.create_container(container)
67
68