~duplicity-team/duplicity/0.8-series

« back to all changes in this revision

Viewing changes to duplicity/collections.py

  • Committer: Kenneth Loafman
  • Date: 2017-07-20 12:06:01 UTC
  • Revision ID: kenneth@loafman.com-20170720120601-v6qw88gf9ayqy4t9
* Fixed encrypted remote manifest handling to merely put out a non-fatal
  error message and continue if the private key is not available.

Show diffs side-by-side

added added

removed removed

Lines of Context:
243
243
        Return manifest by reading remote manifest on backend
244
244
        """
245
245
        assert self.remote_manifest_name
246
 
        # Following by MDR.  Should catch if remote encrypted with
247
 
        # public key w/o secret key
248
246
        try:
249
247
            manifest_buffer = self.backend.get_data(self.remote_manifest_name)
250
248
        except GPGError as message:
251
 
            # TODO: We check for gpg v1 and v2 messages, should be an error code
252
 
            if ("secret key not available" in message.args[0] or
253
 
                    "No secret key" in message.args[0]):
254
 
                return None
255
 
            else:
256
 
                raise
 
249
            log.Error(_("Error processing remote manifest (%s): %s") %
 
250
                      (self.remote_manifest_name, str(message)))
 
251
            return None
257
252
        log.Info(_("Processing remote manifest %s (%s)") % (self.remote_manifest_name, len(manifest_buffer)))
258
253
        return manifest.Manifest().from_string(manifest_buffer)
259
254