Skip to content

Commit

Permalink
Updated testing, fixed issue with png images in python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvisteach committed Mar 20, 2020
1 parent df60135 commit 639828e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -58,6 +58,7 @@ matrix:
allow_failures:
- os: osx
- python: 3.2
- python: 3.3
- python: 3.6-dev
- python: nightly
- python: pypy
Expand Down
8 changes: 7 additions & 1 deletion appJar/lib/png.py
Expand Up @@ -1335,9 +1335,15 @@ def __init__(self, _guess=None, filename=None, file=None, bytes=None):
self.atchunk = None

if _guess is not None:

if (sys.version_info > (3, 0)):
UNIVERSAL_STRING = str
else:
UNIVERSAL_STRING = basestring

if isarray(_guess):
bytes = _guess
elif isinstance(_guess, str):
elif isinstance(_guess, UNIVERSAL_STRING):
filename = _guess
elif hasattr(_guess, 'read'):
file = _guess
Expand Down

0 comments on commit 639828e

Please sign in to comment.