baverman/snaked

bsddb.db.DBError: flags should be one of 'r', 'w', 'c' or 'n'

kopchik opened this issue · 0 comments

Bonjour!

Some problems with the latest snaked from repo:

  File "/usr/local/lib/python2.7/dist-packages/snaked-0.5dev-py2.7.egg/snaked/core/prefs.py", line 191, in __init__
    self.db = anydbm.open(get_settings_path(*name), 'cu')
  File "/usr/lib/python2.7/anydbm.py", line 85, in open
    return mod.open(file, flag, mode)
  File "/usr/lib/python2.7/dbhash.py", line 18, in open
    return bsddb.hashopen(file, flag, mode)
  File "/usr/lib/python2.7/bsddb/__init__.py", line 356, in hashopen
    flags = _checkflag(flag, file)
  File "/usr/lib/python2.7/bsddb/__init__.py", line 434, in _checkflag
    raise error, "flags should be one of 'r', 'w', 'c' or 'n'"
bsddb.db.DBError: flags should be one of 'r', 'w', 'c' or 'n'

It hadn't worked at all, but trivial patch(replace 'cu' with 'c' in anydb.open()) solved the problem.
Ubuntu 11.10 x86, pyston 2.7