def select(page_name):
     region = ReadConfig().get_region
     platform = ReadConfig().get_platform
     filename = None
     if platform == "android":
         if region == "cn":
             filename = mapping.get(page_name)
     elif platform == "ios":
         pass
     if filename is None:
         raise TypeError("cannot find the mapping relationship for " + page_name)
     return ReadYaml().read(os.path.join(root_dir, "element", filename))
Exemplo n.º 2
0
def data():
    filename = "data.yaml"
    return ReadYaml().read(os.path.join(root_dir, "data", filename))