Commit baffee0a authored by bescoto's avatar bescoto

Fixed socket too long error


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@261 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent ed67eab5
New in v0.10.2 (2003/01/19)
---------------------------
New in v0.10.1 (2002/09/16) New in v0.10.1 (2002/09/16)
--------------------------- ---------------------------
......
#!/usr/bin/python #!/usr/bin/python
import sys, os import sys, os
sys.path.insert(0, "../src") sys.path.insert(0, "../rdiff_backup")
from rpath import * from rpath import *
from connection import * from connection import *
import Globals import Globals
......
...@@ -21,17 +21,6 @@ from rorpiter import * ...@@ -21,17 +21,6 @@ from rorpiter import *
import Globals, Hardlink, MiscStats import Globals, Hardlink, MiscStats
class SkipFileException(Exception):
"""Signal that the current file should be skipped but then continue
This exception will often be raised when there is problem reading
an individual file, but it makes sense for the rest of the backup
to keep going.
"""
pass
class HighLevel: class HighLevel:
"""High level static functions """High level static functions
......
...@@ -39,7 +39,7 @@ able to narrow down the possibilities. ...@@ -39,7 +39,7 @@ able to narrow down the possibilities.
import tempfile, errno, signal, cPickle, C import tempfile, errno, signal, cPickle, C
from static import * from static import *
from rpath import *
class RobustAction: class RobustAction:
"""Represents a file operation to be accomplished later""" """Represents a file operation to be accomplished later"""
......
...@@ -20,6 +20,16 @@ import os, stat, re, sys, shutil, gzip, socket ...@@ -20,6 +20,16 @@ import os, stat, re, sys, shutil, gzip, socket
from static import * from static import *
class SkipFileException(Exception):
"""Signal that the current file should be skipped but then continue
This exception will often be raised when there is problem reading
an individual file, but it makes sense for the rest of the backup
to keep going.
"""
pass
class RPathException(Exception): pass class RPathException(Exception): pass
class RPathStatic: class RPathStatic:
...@@ -209,7 +219,9 @@ class RPathStatic: ...@@ -209,7 +219,9 @@ class RPathStatic:
""" """
assert rpath.conn is Globals.local_connection assert rpath.conn is Globals.local_connection
s = socket.socket(socket.AF_UNIX) s = socket.socket(socket.AF_UNIX)
s.bind(rpath.path) try: s.bind(rpath.path)
except socket.error, exc:
raise SkipFileException("Socket error: " + str(exc))
def gzip_open_local_read(rpath): def gzip_open_local_read(rpath):
"""Return open GzipFile. See security note directly above""" """Return open GzipFile. See security note directly above"""
......
"""commontest - Some functions and constants common to several test cases""" """commontest - Some functions and constants common to several test cases"""
import os, sys import os, sys
sys.path.insert(0, "../src") sys.path.insert(0, "../rdiff_backup")
from rpath import * from rpath import *
from destructive_stepping import * from destructive_stepping import *
from highlevel import * from highlevel import *
import Globals, Hardlink, SetConnections, Main import Globals, Hardlink, SetConnections, Main
SourceDir = "../src" SourceDir = "../rdiff_backup"
AbsCurdir = os.getcwd() # Absolute path name of current directory AbsCurdir = os.getcwd() # Absolute path name of current directory
AbsTFdir = AbsCurdir+"/testfiles" AbsTFdir = AbsCurdir+"/testfiles"
MiscDir = "../misc" MiscDir = "../misc"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment