1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-14 18:36:40 +00:00

Merge pull request #59 from ThomasWaldmann/fix-no-remote-borg

better Exception msg if there is no Borg installed on the remote repo…
This commit is contained in:
TW 2015-06-18 23:35:56 +02:00
commit b41b7d06c5

View file

@ -141,7 +141,10 @@ def __init__(self, location, create=False):
self.r_fds = [self.stdout_fd]
self.x_fds = [self.stdin_fd, self.stdout_fd]
version = self.call('negotiate', 1)
try:
version = self.call('negotiate', 1)
except ConnectionClosed:
raise Exception('Server immediately closed connection - is Borg installed and working on the server?')
if version != 1:
raise Exception('Server insisted on using unsupported protocol version %d' % version)
self.id = self.call('open', location.path, create)