Replaced 'not foo == None' with 'foo is not None' in ascii sniffing too

This commit is contained in:
Joar Wandborg 2012-03-08 23:49:41 +01:00
parent e2007352f5
commit 9743ce886a

View File

@ -27,7 +27,7 @@ _log = logging.getLogger(__name__)
SUPPORTED_EXTENSIONS = ['txt', 'asc', 'nfo']
def sniff_handler(media_file, **kw):
if not kw.get('media') == None:
if kw.get('media') is not None:
name, ext = os.path.splitext(kw['media'].filename)
clean_ext = ext[1:].lower()