summaryrefslogtreecommitdiff
path: root/rdiff-backup/src/setconnections.py
diff options
context:
space:
mode:
authorben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-03-26 20:43:33 +0000
committerben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-03-26 20:43:33 +0000
commitb3ed4655ef3b9694c53325eb952f5affc45cdb51 (patch)
tree19dfb6f5fb455caea9e86f98ff80b38213bfca12 /rdiff-backup/src/setconnections.py
parentabbd3dde1b37b92be97c099edc1d31745b9b21ae (diff)
downloadrdiff-backup-b3ed4655ef3b9694c53325eb952f5affc45cdb51.tar.gz
Improved error reporting when rdiff-backup doesn't start correctly on
the remote side. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@27 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/src/setconnections.py')
-rw-r--r--rdiff-backup/src/setconnections.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/rdiff-backup/src/setconnections.py b/rdiff-backup/src/setconnections.py
index 07c6893..c423294 100644
--- a/rdiff-backup/src/setconnections.py
+++ b/rdiff-backup/src/setconnections.py
@@ -109,15 +109,26 @@ class SetConnections:
conn_number = len(Globals.connections)
conn = PipeConnection(stdout, stdin, conn_number)
- cls.check_connection_version(conn)
+ cls.check_connection_version(conn, remote_cmd)
Log("Registering connection %d" % conn_number, 7)
cls.init_connection_routing(conn, conn_number, remote_cmd)
cls.init_connection_settings(conn)
return conn
- def check_connection_version(cls, conn):
+ def check_connection_version(cls, conn, remote_cmd):
"""Log warning if connection has different version"""
- remote_version = conn.Globals.get('version')
+ try: remote_version = conn.Globals.get('version')
+ except ConnectionReadError, exception:
+ Log.FatalError("""%s
+
+Couldn't start up the remote connection by executing
+
+ %s
+
+Remember that, under the default settings, rdiff-backup must be
+installed in the PATH on the remote system. See the man page for more
+information.""" % (exception, remote_cmd))
+
if remote_version != Globals.version:
Log("Warning: Local version %s does not match remote version %s."
% (Globals.version, remote_version), 2)