Skip to content

Commit

Permalink
listdir on error
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermef committed Oct 29, 2015
1 parent a7b1ae2 commit 544f688
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/fixtures/images/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# Copyright (c) 2011 globo.com timehome@corp.globo.com

import sys
from os import listdir
from os.path import abspath, join, dirname


Expand All @@ -32,9 +33,13 @@ def get_abs_path(img):


def get_image(img):
with open(img, 'r') as stream:
body = stream.read()
return body
try:
with open(img, 'r') as stream:
body = stream.read()
return body
except IOError, e:
print listdir(abspath(dirname(img)))
raise e


def valid_image():
Expand Down

0 comments on commit 544f688

Please sign in to comment.