From a1a703df32a15a7a284b8cb95b4d7cd9b333a012 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 12 Aug 2004 07:41:05 +0000 Subject: [PATCH] Let's go to repr. Beware, people, this may invalidate certain databases. --- plugins/FunDB.py | 2 +- plugins/Note.py | 2 +- src/dbi.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/FunDB.py b/plugins/FunDB.py index e3bee6c81..70c41011f 100755 --- a/plugins/FunDB.py +++ b/plugins/FunDB.py @@ -60,7 +60,7 @@ class DbiFunDBDB(object): __metaclass__ = dbi.Record __fields__ = [ 'by', - ('text', str), + 'text', ] def __init__(self): diff --git a/plugins/Note.py b/plugins/Note.py index d22a6496c..cf84b1d81 100644 --- a/plugins/Note.py +++ b/plugins/Note.py @@ -90,7 +90,7 @@ class DbiNoteDB(dbi.DB): 'notified', 'read', 'public', - ('text', str) + 'text', ] def setRead(self, id): diff --git a/src/dbi.py b/src/dbi.py index 4643d02fd..105f7d769 100644 --- a/src/dbi.py +++ b/src/dbi.py @@ -348,7 +348,7 @@ class Record(type): setattr(self, name, defaults[name]) def serialize(self): - return csv.join([str(getattr(self, name)) for name in fields]) + return csv.join([repr(getattr(self, name)) for name in fields]) def deserialize(self, s): unseenRecords = sets.Set(fields)