Small patch from Steven Taschuk to work around buggy dbm
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 22 May 2006 12:09:48 +0000 (12:09 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 22 May 2006 12:09:48 +0000 (12:09 +0000)
commit68c596fbb99645c7de4bd5cb972671487717ccd7
treec32c9fc06812c3136dfb46e7eda9d596a5bc9c05
parentc800932bb420b3f1d7d5ae66d1aa3efed629cd03
Small patch from Steven Taschuk to work around buggy dbm
implementations which have non-idempotent len() functions, so that
the test `if db' doesn't return the same result every time (!). By
explicitly testing whether db is None rather than returning false if
db is non-None but inexplicably returns zero from len(), we avoid
the problem in favour of the semantics I actually intended.

git-svn-id: svn://svn.tartarus.org/sgt/utils@6715 cda61777-01e9-0310-a592-d414129be87e
cvt-utf8/cvt-utf8