def sz_expand(value, value_type): if value_type == reg.REG_EXPAND_SZ: return reg.ExpandEnvironmentStrings(value) else: return value