mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Whoa. Long time no commit. Anyway, we make shelf dispatch to Shelf appropriately.
This commit is contained in:
parent
6504dfcaa1
commit
1a40c6fc69
@ -87,14 +87,14 @@ def open(filename, mode='r'):
|
||||
else:
|
||||
raise ValueError, 'Invalid flag: %s' % mode
|
||||
|
||||
def shelf(filename):
|
||||
def shelf(filename, *args, **kwargs):
|
||||
"""Opens a new shelf database object."""
|
||||
if os.path.exists(filename):
|
||||
return Shelf(filename)
|
||||
return Shelf(filename, *args, **kwargs)
|
||||
else:
|
||||
maker = Maker(filename)
|
||||
maker.finish()
|
||||
return Shelf(filename)
|
||||
return Shelf(filename, *args, **kwargs)
|
||||
|
||||
def _readKeyValue(fd):
|
||||
klen = 0
|
||||
|
Loading…
Reference in New Issue
Block a user