rdiff-backup-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Rdiff-backup-commits] rdiff-backup CHANGELOG rdiff_backup/SetConnecti..


From: Andrew Ferguson
Subject: [Rdiff-backup-commits] rdiff-backup CHANGELOG rdiff_backup/SetConnecti...
Date: Thu, 08 Jan 2009 21:03:44 +0000

CVSROOT:        /sources/rdiff-backup
Module name:    rdiff-backup
Changes by:     Andrew Ferguson <owsla> 09/01/08 21:03:44

Modified files:
        .              : CHANGELOG 
        rdiff_backup   : SetConnections.py connection.py 

Log message:
        Print more helpful error messages when the remote command cannot be 
started
        on Windows. Fix --test-server option when used with remote Windows 
clients.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/CHANGELOG?cvsroot=rdiff-backup&r1=1.348&r2=1.349
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/rdiff_backup/SetConnections.py?cvsroot=rdiff-backup&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/rdiff_backup/connection.py?cvsroot=rdiff-backup&r1=1.31&r2=1.32

Patches:
Index: CHANGELOG
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/CHANGELOG,v
retrieving revision 1.348
retrieving revision 1.349
diff -u -b -r1.348 -r1.349
--- CHANGELOG   7 Jan 2009 01:23:20 -0000       1.348
+++ CHANGELOG   8 Jan 2009 21:03:44 -0000       1.349
@@ -1,6 +1,12 @@
 New in v1.3.1 (????/??/??)
 ---------------------------
 
+Print more helpful error messages when the remote command cannot be started
+on Windows. Thanks to Dominic for the bug report. (Andrew Ferguson)
+
+Fix --test-server option when used with remote Windows clients. Thanks to
+Thanos Diacakis for testing. (Andrew Ferguson)
+
 Fix --override-chars-to-quote option. (Andrew Ferguson)
 
 Fix typo in robust.py which broke error reporting. Closes Savannah bug #25255.

Index: rdiff_backup/SetConnections.py
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/rdiff_backup/SetConnections.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- rdiff_backup/SetConnections.py      9 Oct 2008 20:23:42 -0000       1.18
+++ rdiff_backup/SetConnections.py      8 Jan 2009 21:03:44 -0000       1.19
@@ -119,7 +119,10 @@
 
 def fill_schema(host_info):
        """Fills host_info into the schema and returns remote command"""
+       try:
        return __cmd_schema % host_info
+       except TypeError:
+               Log.FatalError("Invalid remote schema:\n\n%s\n" % __cmd_schema)
 
 def init_connection(remote_cmd):
        """Run remote_cmd, register connection, and then return it
@@ -134,10 +137,13 @@
        Log("Executing " + remote_cmd, 4)
        if os.name == "nt":
                import subprocess
+               try:
                process = subprocess.Popen(remote_cmd, shell=False, bufsize=0,
                                                                
stdin=subprocess.PIPE, 
                                                                
stdout=subprocess.PIPE)
                (stdin, stdout) = (process.stdin, process.stdout)
+               except OSError:
+                       (stdin, stdout) = (None, None)
        else:
                stdin, stdout = os.popen2(remote_cmd)
        conn_number = len(Globals.connections)
@@ -152,7 +158,7 @@
 def check_connection_version(conn, remote_cmd):
        """Log warning if connection has different version"""
        try: remote_version = conn.Globals.get('version')
-       except connection.ConnectionReadError, exception:
+       except connection.ConnectionError, exception:
                Log.FatalError("""%s
 
 Couldn't start up the remote connection by executing
@@ -247,7 +253,7 @@
        conn = Globals.connections[conn_number]
        try:
                assert conn.Globals.get('current_time') is None
-               assert type(conn.os.getuid()) is int
+               assert type(conn.os.listdir('.')) is list
                version = conn.Globals.get('version')
        except:
                sys.stderr.write("Server tests failed\n")

Index: rdiff_backup/connection.py
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/rdiff_backup/connection.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- rdiff_backup/connection.py  24 Sep 2008 00:25:47 -0000      1.31
+++ rdiff_backup/connection.py  8 Jan 2009 21:03:44 -0000       1.32
@@ -203,7 +203,7 @@
                                                           
C.long2str(long(len(data))))
                        self.outpipe.write(data)
                        self.outpipe.flush()
-               except IOError: raise ConnectionWriteError()
+               except (IOError, AttributeError): raise ConnectionWriteError()
 
        def _read(self, length):
                """Read length bytes from inpipe, returning result"""




reply via email to

[Prev in Thread] Current Thread [Next in Thread]