summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup/SetConnections.py
diff options
context:
space:
mode:
authorben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-07-16 05:16:42 +0000
committerben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-07-16 05:16:42 +0000
commit4c8440ee71ba819c7327913870a615186ef8d386 (patch)
tree5d4d811680e1b3fd0a3393de3d49eb9cae116481 /rdiff-backup/rdiff_backup/SetConnections.py
parent6efc3610e37994c38a70cf32266e1e495035fbd3 (diff)
downloadrdiff-backup-4c8440ee71ba819c7327913870a615186ef8d386.tar.gz
Various changes to 0.9.3, see CHANGELOG
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@157 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/SetConnections.py')
-rw-r--r--rdiff-backup/rdiff_backup/SetConnections.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/rdiff-backup/rdiff_backup/SetConnections.py b/rdiff-backup/rdiff_backup/SetConnections.py
index 91edd7d..8d763a1 100644
--- a/rdiff-backup/rdiff_backup/SetConnections.py
+++ b/rdiff-backup/rdiff_backup/SetConnections.py
@@ -28,8 +28,13 @@ __conn_remote_cmds = [None]
class SetConnectionsException(Exception): pass
-def InitRPs(arglist, remote_schema = None, remote_cmd = None):
- """Map the given file descriptions into rpaths and return list"""
+def get_cmd_pairs(arglist, remote_schema = None, remote_cmd = None):
+ """Map the given file descriptions into command pairs
+
+ Command pairs are tuples cmdpair with length 2. cmdpair[0] is
+ None iff it describes a local path, and cmdpair[1] is the path.
+
+ """
global __cmd_schema
if remote_schema: __cmd_schema = remote_schema
elif not Globals.ssh_compression: __cmd_schema = __cmd_schema_no_compress
@@ -44,11 +49,10 @@ def InitRPs(arglist, remote_schema = None, remote_cmd = None):
elif remote_schema:
Log("Remote schema option ignored - no remote file "
"descriptions.", 2)
-
- cmd_pairs = map(desc2cmd_pairs, desc_pairs)
+ cmdpairs = map(desc2cmd_pairs, desc_pairs)
if remote_cmd: # last file description gets remote_cmd
cmd_pairs[-1] = (remote_cmd, cmd_pairs[-1][1])
- return map(cmdpair2rp, cmd_pairs)
+ return cmdpairs
def cmdpair2rp(cmd_pair):
"""Return RPath from cmd_pair (remote_cmd, filename)"""