import oe.maketype
import bb.msg
def typed_value(key, d):
"""Construct a value for the specified metadata variable, using its flags
to determine the type and parameters for construction."""
var_type = d.getVarFlag(key, 'type')
flags = d.getVarFlags(key)
if flags is not None:
flags = dict((flag, d.expand(value))
for flag, value in flags.iteritems())
else:
flags = {}
try:
return oe.maketype.create(d.getVar(key, True) or '', var_type, **flags)
except (TypeError, ValueError), exc:
bb.msg.fatal("Data", "%s: %s" % (key, str(exc)))
.q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-58643691-1', 'auto');
ga('send', 'pageview');
blob: be5bfb7d37915721bf3df185e9cb3c6f0a9c74ee (
plain)