Skip to content

Use logging instead of print.#1205

Closed
anntzer wants to merge 1 commit intopython-pillow:masterfrom
anntzer:logger
Closed

Use logging instead of print.#1205
anntzer wants to merge 1 commit intopython-pillow:masterfrom
anntzer:logger

Conversation

@anntzer
Copy link
Contributor

@anntzer anntzer commented Apr 23, 2015

cf. #1191.

Only TiffImagePlugin and OLEFileIO still rely on a DEBUG flag. I left
TiffImagePlugin as it is because I hope #1059 gets merged in first, and
OLEFileIO because it uses its own logic.

Untested, as usual.

cf. python-pillow#1191.

Only TiffImagePlugin and OLEFileIO still rely on a DEBUG flag.  I left
TiffImagePlugin as it is because I hope python-pillow#1059 gets merged in first, and
OLEFileIO because it uses its own logic.

Untested, as usual.
@hugovk
Copy link
Member

hugovk commented Apr 23, 2015

The build failed:

Failure: SyntaxError (invalid syntax (PcxImagePlugin.py, line 146)) ... ERROR
======================================================================
ERROR: Failure: SyntaxError (invalid syntax (PcxImagePlugin.py, line 146))
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/nose/loader.py", line 414, in loadTestsFromName
    addr.filename, addr.module)
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/travis/build/python-pillow/Pillow/Tests/test_file_dcx.py", line 3, in <module>
    from PIL import Image, DcxImagePlugin
  File "/home/travis/build/python-pillow/Pillow/PIL/DcxImagePlugin.py", line 28, in <module>
    from PIL.PcxImagePlugin import PcxImageFile
  File "/home/travis/build/python-pillow/Pillow/PIL/PcxImagePlugin.py", line 146
    im.size[0], bits, stride))
                             ^
SyntaxError: invalid syntax

https://travis-ci.org/python-pillow/Pillow/builds/59646861

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a change in functionality. It used to raise SyntaxError. Does logger.exception() raise anything? If not, it's a change in functionality. If it does, it's a different error reason.

@hugovk
Copy link
Member

hugovk commented Apr 23, 2015

I strongly recommend enabling Travis CI for your own account -- it's free -- so you can check builds before creating PRs.

See also: https://github.com/python-pillow/Pillow/blob/master/CONTRIBUTING.md

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants