summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup/rpath.py
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2007-07-09 03:53:40 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2007-07-09 03:53:40 +0000
commit2492280ff6d81bb7862ce9b3d51e02be9603ab7d (patch)
treea368969954d6cc5a624ee093aafadac4996564d3 /rdiff-backup/rdiff_backup/rpath.py
parent52d3dc08b78a8210a50cc688a735341706dd4159 (diff)
downloadrdiff-backup-2492280ff6d81bb7862ce9b3d51e02be9603ab7d.tar.gz
Squash regress/check_pids bug and properly pickle RPath's
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@815 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/rpath.py')
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py
index e5d84d9..37ac54c 100644
--- a/rdiff-backup/rdiff_backup/rpath.py
+++ b/rdiff-backup/rdiff_backup/rpath.py
@@ -753,17 +753,17 @@ class RPath(RORPath):
def __getstate__(self):
"""Return picklable state
- The connection must be local because we can't pickle a
- connection. Data and any attached file also won't be saved.
+ The rpath's connection will be encoded as its conn_number. It
+ and the other information is put in a tuple. Data and any attached
+ file won't be saved.
"""
- assert self.conn is Globals.local_connection
- return (self.index, self.base, self.data)
+ return (self.conn.conn_number, self.base, self.index, self.data)
def __setstate__(self, rpath_state):
"""Reproduce RPath from __getstate__ output"""
- self.conn = Globals.local_connection
- self.index, self.base, self.data = rpath_state
+ conn_number, self.base, self.index, self.data = rpath_state
+ self.conn = Globals.connection_dict[conn_number]
self.path = "/".join((self.base,) + self.index)
def setdata(self):