Skip to content

Added python error catching - #158

Merged
gfx merged 1 commit into
pygments:masterfrom
shybovycha:master
Dec 11, 2016
Merged

Added python error catching#158
gfx merged 1 commit into
pygments:masterfrom
shybovycha:master

Conversation

@shybovycha

Copy link
Copy Markdown
Contributor

When python2 command fails for some reason, all you get is just Failed to get header. error. This PR adds more meaningful error message.

So if one for some reason (for example, when using pyenv) have no python2 binary, one should have a meaningful notification on what's happening.

@gfx

gfx commented Dec 10, 2016

Copy link
Copy Markdown
Contributor

Looks great. Can you add a test for it?

@gfx
gfx merged commit d1c0721 into pygments:master Dec 11, 2016
jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Mar 20, 2017
Version 1.1.1 (2016/12/28)
-----------------------------

* Suppress Ruby 2.4.0's warnings [#172](pygments/pygments.rb#172)
* Enable `frozen_string_literal` [#173](pygments/pygments.rb#173)

Version 1.1.0 (2016/12/24)
-----------------------------

* Support JRuby [#170](pygments/pygments.rb#170)
* Make pygments.rb thread safe [#171](pygments/pygments.rb#171)

Version 1.0.0 (2016/12/11)
-----------------------------

* Upgrade bundled pygments to 2.2.0-HEAD [#167](pygments/pygments.rb#167)
  * This includes **incompatible changes* because of upgrade of pygments.
    See http://pygments.org/ for details.
* Relax yajl-ruby dependency to "~> 1.2" [#164](pygments/pygments.rb#164)
* Python binary can be configured by `PYTMENTS_RB_PYTHON` env [#168](pygments/pygments.rb#168)
* Improved error messages when python binary is missing [#158](pygments/pygments.rb#158)
msk pushed a commit to msk/pkgsrc that referenced this pull request May 11, 2026
Version 1.1.1 (2016/12/28)
-----------------------------

* Suppress Ruby 2.4.0's warnings [NetBSD#172](pygments/pygments.rb#172)
* Enable `frozen_string_literal` [NetBSD#173](pygments/pygments.rb#173)

Version 1.1.0 (2016/12/24)
-----------------------------

* Support JRuby [NetBSD#170](pygments/pygments.rb#170)
* Make pygments.rb thread safe [NetBSD#171](pygments/pygments.rb#171)

Version 1.0.0 (2016/12/11)
-----------------------------

* Upgrade bundled pygments to 2.2.0-HEAD [NetBSD#167](pygments/pygments.rb#167)
  * This includes **incompatible changes* because of upgrade of pygments.
    See http://pygments.org/ for details.
* Relax yajl-ruby dependency to "~> 1.2" [NetBSD#164](pygments/pygments.rb#164)
* Python binary can be configured by `PYTMENTS_RB_PYTHON` env [NetBSD#168](pygments/pygments.rb#168)
* Improved error messages when python binary is missing [NetBSD#158](pygments/pygments.rb#158)
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this pull request May 14, 2026
Version 1.1.1 (2016/12/28)
-----------------------------

* Suppress Ruby 2.4.0's warnings [#172](pygments/pygments.rb#172)
* Enable `frozen_string_literal` [#173](pygments/pygments.rb#173)

Version 1.1.0 (2016/12/24)
-----------------------------

* Support JRuby [#170](pygments/pygments.rb#170)
* Make pygments.rb thread safe [#171](pygments/pygments.rb#171)

Version 1.0.0 (2016/12/11)
-----------------------------

* Upgrade bundled pygments to 2.2.0-HEAD [#167](pygments/pygments.rb#167)
  * This includes **incompatible changes* because of upgrade of pygments.
    See http://pygments.org/ for details.
* Relax yajl-ruby dependency to "~> 1.2" [#164](pygments/pygments.rb#164)
* Python binary can be configured by `PYTMENTS_RB_PYTHON` env [#168](pygments/pygments.rb#168)
* Improved error messages when python binary is missing [#158](pygments/pygments.rb#158)
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