提交 4a093a7a authored 作者: blu's avatar blu

video upload: fix variable scope issue

上级 98fcf67a
...@@ -188,10 +188,10 @@ worker.conf.update( ...@@ -188,10 +188,10 @@ worker.conf.update(
def getRegionConfig(ipcSN): def getRegionConfig(ipcSN):
region = None region = None
reqUrl = API_HOST + API_CAMERA_CFG_URI.format(ipcSN)
if ipcSN in CAMERA_CONFIG_MAP and type(CAMERA_CONFIG_MAP[ipcSN]) is dict: if ipcSN in CAMERA_CONFIG_MAP and type(CAMERA_CONFIG_MAP[ipcSN]) is dict:
region = CAMERA_CONFIG_MAP[ipcSN]['region'] region = CAMERA_CONFIG_MAP[ipcSN]['region']
elif CAMERA_CONFIG_MAP.get(ipcSN) is None and API_HOST: elif CAMERA_CONFIG_MAP.get(ipcSN) is None and API_HOST:
reqUrl = API_HOST + API_CAMERA_CFG_URI.format(ipcSN)
res = requests.get(reqUrl) res = requests.get(reqUrl)
try: try:
if res.status_code == 200: if res.status_code == 200:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论