From e0c58cc0577fbb1b692e051eabd8597ba35c886a Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 28 Dec 2009 10:06:40 -0500 Subject: libbe.storage.vcs.base.VCS._init() now creates the '.be/version' file. And python test.py libbe.storage.vcs.base passes again. --- libbe/storage/base.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libbe/storage/base.py') diff --git a/libbe/storage/base.py b/libbe/storage/base.py index b43f765..9da60ad 100644 --- a/libbe/storage/base.py +++ b/libbe/storage/base.py @@ -272,10 +272,11 @@ class Storage (object): else: decode = False value = self._get(*args, **kwargs) - if decode == True and type(value) != types.UnicodeType: - return unicode(value, self.encoding) - if decode == False and type(value) != types.StringType: - return value.encode(self.encoding) + if value != None: + if decode == True and type(value) != types.UnicodeType: + return unicode(value, self.encoding) + elif decode == False and type(value) != types.StringType: + return value.encode(self.encoding) return value def _get(self, id, default=InvalidObject, revision=None): -- cgit