Commit 25eb1b60 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira Committed by GitHub

Update __init__.py

Just fixing an issue with python 3.
Basically, you cannot do indentation mixing spaces and tabs in the same python file (https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces)
parent 626b22ae
......@@ -20,8 +20,8 @@ def get_config():
# fix imghdr's jpeg detection to use the first two bytes (according to https://en.wikipedia.org/wiki/List_of_file_signatures)
import imghdr
def _test_jpeg(h, f):
if h.startswith('\xff\xd8'):
return "jpeg"
if h.startswith('\xff\xd8'):
return "jpeg"
imghdr.tests.append(_test_jpeg)
def load(filename, extension=None):
......@@ -56,7 +56,7 @@ def load(filename, extension=None):
if extension == 'auto':
extension = imghdr.what(filename)
if extension is None:
raise IOError("Could not detect the image type of file %s" % filename)
raise IOError("Could not detect the image type of file %s" % filename)
extension = "." + extension
f = bob.io.base.File(filename, 'r', extension)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment