'database' removed from keyword arguments in the decorator (so functions not needing any don't have to declare any)
--- a/alexandria.py Wed Sep 02 16:49:05 2009 -0700
+++ b/alexandria.py Wed Sep 02 16:53:57 2009 -0700
@@ -246,7 +246,7 @@
@command(dbopts,
usage='%name PATH')
def info(cfg, path):
- """show information about a path"""
+ """Show information about a path"""
path = _short_path(cfg, path)
paper = Paper.get_by(path = path)
@@ -339,6 +339,9 @@
def inner(*args, **kwargs):
cfg = parse_config()
initDB(kwargs.get('database') or cfg['dbpath'])
+ if 'database' in kwargs:
+ del kwargs['database']
+
func(cfg, *args, **kwargs)
return inner