rrdweb/rrd.py
changeset 5 e716718482c3
parent 1 18787b57ba46
child 19 58df27d54d2e
child 29 c756e522c9ac
--- 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.