code cleanup
-changed module name to correct naming convention -remove some unused imports
This commit is contained in:
parent
9612adf72e
commit
dec68649c1
4 changed files with 25 additions and 27 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue