CC-3700: media-monitor- Surround all accesses to external resources with try/except
-fixed
This commit is contained in:
parent
86282a8d8a
commit
7c49fc77d5
7 changed files with 58 additions and 37 deletions
|
@ -2,6 +2,7 @@ import json
|
|||
import time
|
||||
import os
|
||||
import logging
|
||||
import traceback
|
||||
|
||||
# For RabbitMQ
|
||||
from kombu.connection import BrokerConnection
|
||||
|
@ -116,7 +117,11 @@ class AirtimeNotifier(Notifier):
|
|||
|
||||
if m['delete']:
|
||||
self.logger.info("Deleting file: %s ", filepath)
|
||||
os.unlink(filepath)
|
||||
try:
|
||||
os.unlink(filepath)
|
||||
except Exception, e:
|
||||
self.logger.error('Exception: %s', e)
|
||||
self.logger.error("traceback: %s", traceback.format_exc())
|
||||
|
||||
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue