code cleanup
-changed module name to correct naming convention -remove some unused imports
This commit is contained in:
parent
9612adf72e
commit
dec68649c1
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import replay_gain
|
||||
import replaygain
|
||||
|
||||
import os
|
||||
import hashlib
|
||||
|
@ -126,7 +126,7 @@ class AirtimeMetadata:
|
|||
|
||||
md = {}
|
||||
|
||||
replay_gain_val = replay_gain.calculate_replay_gain(filepath)
|
||||
replay_gain_val = replaygain.calculate_replay_gain(filepath)
|
||||
self.logger.info('ReplayGain calculated as %s for %s' % (replay_gain_val, filepath))
|
||||
md['MDATA_KEY_REPLAYGAIN'] = replay_gain_val
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ class MediaMonitorCommon:
|
|||
def is_readable(self, item, is_dir):
|
||||
try:
|
||||
return self.is_user_readable(item, 'www-data', 'www-data')
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
self.logger.warn(u"Failed to check owner/group/permissions for %s", item)
|
||||
return False
|
||||
|
||||
|
@ -162,7 +162,7 @@ class MediaMonitorCommon:
|
|||
try:
|
||||
os.rmdir(dir)
|
||||
self.cleanup_empty_dirs(os.path.dirname(dir))
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
#non-critical exception because we probably tried to delete a non-empty dir.
|
||||
#Don't need to log this, let's just "return"
|
||||
pass
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import time
|
||||
import logging
|
||||
import logging.config
|
||||
import sys
|
||||
import os
|
||||
import signal
|
||||
import traceback
|
||||
import locale
|
||||
|
||||
|
@ -14,7 +12,7 @@ from configobj import ConfigObj
|
|||
from api_clients import api_client as apc
|
||||
from std_err_override import LogWriter
|
||||
|
||||
from multiprocessing import Process, Queue as mpQueue
|
||||
from multiprocessing import Queue as mpQueue
|
||||
|
||||
from threading import Thread
|
||||
|
||||
|
|
Loading…
Reference in New Issue