Commit 01071351 by 刘航

【BUG】解决遗撒无法保存图片的问题

1 parent 12c715c6
...@@ -46,7 +46,7 @@ class EventToLocalUtil(object): ...@@ -46,7 +46,7 @@ class EventToLocalUtil(object):
index = 0 index = 0
for pic in picsArr: for pic in picsArr:
picPath = '' picPath = ''
if 'ofilename' in pic: if 'ofilename' in pic and len(pic['ofilename'])>0:
if index == 0: if index == 0:
for s in (pic['ofilename'].split('.'))[0:-1]: for s in (pic['ofilename'].split('.'))[0:-1]:
if len(infoPath) >0: if len(infoPath) >0:
...@@ -61,7 +61,7 @@ class EventToLocalUtil(object): ...@@ -61,7 +61,7 @@ class EventToLocalUtil(object):
dataDict['event_refid'] = str(uuid.uuid1()) dataDict['event_refid'] = str(uuid.uuid1())
if index == 0: if index == 0:
infoPath = dataDict['event_refid'] infoPath = dataDict['event_refid']
picPath = '{}-{}{}'.format(dataDict['event_refid'] , index , '.jpg') picPath = '{}/{}-{}{}'.format(basePath ,dataDict['event_refid'] , index , '.jpg')
else: else:
self.__logerror('saveEventToLocal cannot find ofilename or event_refid,\ self.__logerror('saveEventToLocal cannot find ofilename or event_refid,\
picPath cannot generate, will not save pic') picPath cannot generate, will not save pic')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!