Misc logging changes
This commit is contained in:
parent
ba853725c0
commit
9771d3fed8
@ -221,6 +221,7 @@ def vnfFromCacheOrDL(video_link):
|
|||||||
try:
|
try:
|
||||||
vnf = link_to_vnf(video_link)
|
vnf = link_to_vnf(video_link)
|
||||||
addVnfToLinkCache(video_link, vnf)
|
addVnfToLinkCache(video_link, vnf)
|
||||||
|
log.success("VNF Get success: " + video_link)
|
||||||
return vnf,None
|
return vnf,None
|
||||||
except (ExtractorError, twExtract.twExtractError.TwExtractError) as exErr:
|
except (ExtractorError, twExtract.twExtractError.TwExtractError) as exErr:
|
||||||
if 'HTTP Error 404' in exErr.msg or 'No status found with that ID' in exErr.msg:
|
if 'HTTP Error 404' in exErr.msg or 'No status found with that ID' in exErr.msg:
|
||||||
@ -229,13 +230,16 @@ def vnfFromCacheOrDL(video_link):
|
|||||||
exErr.msg=msgs.tweetSuspended
|
exErr.msg=msgs.tweetSuspended
|
||||||
else:
|
else:
|
||||||
exErr.msg=None
|
exErr.msg=None
|
||||||
|
log.error("VNF Get failed: " + video_link + " " + str(exErr))
|
||||||
return None,exErr.msg
|
return None,exErr.msg
|
||||||
except TwitterHTTPError as twErr:
|
except TwitterHTTPError as twErr:
|
||||||
|
log.error("VNF Get failed: " + video_link + " " + str(twErr))
|
||||||
if twErr.e.code == 404:
|
if twErr.e.code == 404:
|
||||||
return None,msgs.tweetNotFound
|
return None,msgs.tweetNotFound
|
||||||
else:
|
else:
|
||||||
return None,None
|
return None,None
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
log.error("VNF Get failed: " + video_link + " " + str(e))
|
||||||
log.error(e)
|
log.error(e)
|
||||||
return None,None
|
return None,None
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user