From 954b26f64c903638bd2c195b595ad08a832ef1fa Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 9 Mar 2015 17:01:29 +0100 Subject: [PATCH] RPCError: include the exception args we get from remote Without this, you just got "RCPError: AttributeError", now you get (e.g.): RPCError: AttributeError(b"'Repository' object has no attribute 'segments'",) --- attic/remote.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/attic/remote.py b/attic/remote.py index f2a0aed06..3c9f1b305 100644 --- a/attic/remote.py +++ b/attic/remote.py @@ -157,7 +157,7 @@ class RemoteRepository(object): raise PathNotAllowed(*res) if error == b'ObjectNotFound': raise Repository.ObjectNotFound(res[0], self.location.orig) - raise self.RPCError(error) + raise self.RPCError("%s%r" % (error.decode('ascii'), res)) else: yield res if not waiting_for and not calls: @@ -312,4 +312,4 @@ class RepositoryCache: def cache_if_remote(repository): if isinstance(repository, RemoteRepository): return RepositoryCache(repository) - return repository \ No newline at end of file + return repository