Quellcode durchsuchen

Merge pull request #2526 from enkore/issue/2513

serve: fix incorrect type of exception_short for Errors
enkore vor 8 Jahren
Ursprung
Commit
eaf90cb73d
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      src/borg/remote.py

+ 1 - 1
src/borg/remote.py

@@ -252,7 +252,7 @@ class RepositoryServer:  # pragma: no cover
                             ex_short = traceback.format_exception_only(e.__class__, e)
                             ex_short = traceback.format_exception_only(e.__class__, e)
                             ex_full = traceback.format_exception(*sys.exc_info())
                             ex_full = traceback.format_exception(*sys.exc_info())
                             if isinstance(e, Error):
                             if isinstance(e, Error):
-                                ex_short = e.get_message()
+                                ex_short = [e.get_message()]
                             if isinstance(e, (Repository.DoesNotExist, Repository.AlreadyExists, PathNotAllowed)):
                             if isinstance(e, (Repository.DoesNotExist, Repository.AlreadyExists, PathNotAllowed)):
                                 # These exceptions are reconstructed on the client end in RemoteRepository.call_many(),
                                 # These exceptions are reconstructed on the client end in RemoteRepository.call_many(),
                                 # and will be handled just like locally raised exceptions. Suppress the remote traceback
                                 # and will be handled just like locally raised exceptions. Suppress the remote traceback