Commit bed0bb6f authored by ben's avatar ben

Fixed --verbosity in Main, added something to lazy?, fixed exception

in rpath.py.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@178 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 62e4f7b1
......@@ -54,7 +54,7 @@ def parse_cmdlineoptions(arglist):
"restrict=", "restrict-read-only=", "restrict-update-only=",
"resume", "resume-window=", "server", "sleep-ratio=",
"ssh-no-compression", "terminal-verbosity=", "test-server",
"verbosity", "version", "windows-mode",
"verbosity=", "version", "windows-mode",
"windows-time-format"])
except getopt.error, e:
commandline_error("Bad commandline options: %s" % str(e))
......
......@@ -204,13 +204,6 @@ class IterTreeReducer:
iterator nature of the connection between hosts and the temporal
order in which the files are processed.
There are three stub functions below: start_process, end_process,
and branch_process. A class that subclasses this one will
probably fill in these functions to do more.
It is important that this class be pickable, so keep that in mind
when subclassing (this is used to resume failed sessions).
"""
def __init__(self, branch_class, branch_args):
"""ITR initializer"""
......@@ -299,7 +292,17 @@ class IterTreeReducer:
class ITRBranch:
"""Helper class for IterTreeReducer below"""
"""Helper class for IterTreeReducer below
There are five stub functions below: start_process, end_process,
branch_process, can_fast_process, and fast_process. A class that
subclasses this one will probably fill in these functions to do
more.
It is important that this class be pickable, so keep that in mind
when subclassing (this is used to resume failed sessions).
"""
base_index = index = None
finished = None
caught_exception = start_successful = None
......
......@@ -775,7 +775,7 @@ class RPath(RORPath):
"""Make a special file with specified type, and major/minor nums"""
cmdlist = ['mknod', self.path, type, str(major), str(minor)]
if self.conn.os.spawnvp(os.P_WAIT, 'mknod', cmdlist) != 0:
RPathException("Error running %s" % cmdlist)
raise RPathException("Error running %s" % cmdlist)
if type == 'c': datatype = 'chr'
elif type == 'b': datatype = 'blk'
else: raise RPathException
......@@ -818,4 +818,6 @@ class RpathDeleter(ITRBranch):
if self.dsrp.isdir(): self.dsrp.rmdir()
else: self.dsrp.delete()
def can_fast_process(self, index, dsrp): return not dsrp.isdir()
def fast_process(self, index, dsrp): dsrp.delete()
......@@ -54,7 +54,7 @@ def parse_cmdlineoptions(arglist):
"restrict=", "restrict-read-only=", "restrict-update-only=",
"resume", "resume-window=", "server", "sleep-ratio=",
"ssh-no-compression", "terminal-verbosity=", "test-server",
"verbosity", "version", "windows-mode",
"verbosity=", "version", "windows-mode",
"windows-time-format"])
except getopt.error, e:
commandline_error("Bad commandline options: %s" % str(e))
......
......@@ -204,13 +204,6 @@ class IterTreeReducer:
iterator nature of the connection between hosts and the temporal
order in which the files are processed.
There are three stub functions below: start_process, end_process,
and branch_process. A class that subclasses this one will
probably fill in these functions to do more.
It is important that this class be pickable, so keep that in mind
when subclassing (this is used to resume failed sessions).
"""
def __init__(self, branch_class, branch_args):
"""ITR initializer"""
......@@ -299,7 +292,17 @@ class IterTreeReducer:
class ITRBranch:
"""Helper class for IterTreeReducer below"""
"""Helper class for IterTreeReducer below
There are five stub functions below: start_process, end_process,
branch_process, can_fast_process, and fast_process. A class that
subclasses this one will probably fill in these functions to do
more.
It is important that this class be pickable, so keep that in mind
when subclassing (this is used to resume failed sessions).
"""
base_index = index = None
finished = None
caught_exception = start_successful = None
......
......@@ -775,7 +775,7 @@ class RPath(RORPath):
"""Make a special file with specified type, and major/minor nums"""
cmdlist = ['mknod', self.path, type, str(major), str(minor)]
if self.conn.os.spawnvp(os.P_WAIT, 'mknod', cmdlist) != 0:
RPathException("Error running %s" % cmdlist)
raise RPathException("Error running %s" % cmdlist)
if type == 'c': datatype = 'chr'
elif type == 'b': datatype = 'blk'
else: raise RPathException
......@@ -818,4 +818,6 @@ class RpathDeleter(ITRBranch):
if self.dsrp.isdir(): self.dsrp.rmdir()
else: self.dsrp.delete()
def can_fast_process(self, index, dsrp): return not dsrp.isdir()
def fast_process(self, index, dsrp): dsrp.delete()
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