Skip to content

Commit

Permalink
replace exit() with return (donnemartin#147)
Browse files Browse the repository at this point in the history
Replacing exit() with return results in displaying the error message in place
of the missing avatar image *without* stopping execution of 'gitsome'.
  • Loading branch information
kengelhardt-godaddy committed Aug 10, 2018
1 parent 5751a31 commit ef1c42e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gitsome/lib/img2txt/img2txt.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def img2txt(imgname, maxLen=35, clr='', ansi=False,
from PIL import Image
img = load_and_resize_image(imgname, antialias, maxLen)
except IOError:
exit("File not found: " + imgname)
return "File not found: " + imgname
except ImportError:
return 'PIL not found.'
# get pixels
Expand Down

0 comments on commit ef1c42e

Please sign in to comment.