For consistency with flagtype. Also less redundant.
for f, checks in regex_checks.iteritems():
for m, r in checks:
v = app.get_field(f)
- t = metadata.metafieldtype(f)
+ t = metadata.fieldtype(f)
if t == metadata.TYPE_MULTILINE:
for l in v.splitlines():
if m.match(l):
}
-def metafieldtype(name):
+def fieldtype(name):
if name in fieldtypes:
return fieldtypes[name]
return TYPE_STRING
if f == 'Market Version Code':
f = 'Current Version Code'
- ftype = metafieldtype(f)
+ ftype = fieldtype(f)
if ftype not in [TYPE_BUILD, TYPE_BUILD_V2]:
add_comments(f)
if ftype == TYPE_MULTILINE:
mf.write("# %s\n" % line)
def w_field(f, v):
- t = metafieldtype(f)
+ t = fieldtype(f)
if t == TYPE_LIST:
v = ','.join(v)
elif t == TYPE_MULTILINE:
def w_field(f, v, prefix='', t=None):
if t is None:
- t = metafieldtype(f)
+ t = fieldtype(f)
v = ''
if t == TYPE_LIST:
v = '\n'