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 b0d20d9
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[requires]
python_version = "3.5"

[dev-packages]

[packages]
20 changes: 20 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions gitsome/.gitsomeconfigurl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.secureserver.net/kengelhardt
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 b0d20d9

Please sign in to comment.