--- a/rrdweb/rrd.py Sun Dec 06 02:25:30 2009 +0200
+++ b/rrdweb/rrd.py Tue Dec 08 20:41:16 2009 +0200
@@ -50,6 +50,19 @@
# option value
return (key, str(value))
+def merge_opts (*all_opts) :
+ """
+ Merge the given series of opt dicts
+ """
+
+ out = dict()
+
+ for opts in all_opts :
+ # XXX: not strictly true, merge lists
+ out.update(opts)
+
+ return out
+
def run_cmd (func, pre_args, opts, post_args) :
"""
Run the given rrdtool.* function, formatting the given positional arguments and options.