diff --git a/lib/mdb/db.py b/lib/mdb/db.py index 0afe187..2bc8ff2 100644 --- a/lib/mdb/db.py +++ b/lib/mdb/db.py @@ -100,12 +100,13 @@ class PVVDB: def load(self, username, lock=False): # Read the record from the database. Will do an automatic lock # if `lock' is True. - rv = self.rcs.checkout( - self.__filename(username), lock) - userfile = file(self.__filename(username)) + cwd = os.getcwd() + os.chdir(self.base) + rv = self.rcs.checkout(username + ",v") + userfile = file(username) + os.chdir(cwd) member = {} for line in userfile: - print line key, value = line.strip().split(": ", 1) if not key in self.format: raise PVVDBError, "%s not a legal attribute." % `key` @@ -121,7 +122,7 @@ class PVVDB: else: # we should not be here raise PVVDBError, "%s not legal datatype." % `self.format[key]` - member[key] = value + member[key] = v return PVVMember(member, self) def save(self, username, comment="", lock=False):