Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1417732 - python-demjson in CentOS 7 exits 0 on errors
Summary: python-demjson in CentOS 7 exits 0 on errors
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: python-demjson
Version: epel7
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Luke Macken
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-30 19:27 UTC by Phil Porada
Modified: 2021-02-17 05:05 UTC (History)
3 users (show)

Fixed In Version: python-demjson-2.2.4-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-17 05:05:58 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github https://github.com/dmeranda demjson issues 25 0 None None None 2020-06-04 22:00:24 UTC

Description Phil Porada 2017-01-30 19:27:30 UTC
Description of problem:
The provided yum python-demjson package is 2.2.2-1.el7 and will exit 0 on invalid json. The pip installed demjson package will be 2.2.4 and will exit 1 on the invalid json. The exit 1 is the correct thing that should happen.

Version-Release number of selected component (if applicable):
 python-demjson                                               noarch                                               2.2.2-1.el7                                                 epel                                               148 k
Linux default-centos-7.vagrantup.com 3.10.0-514.2.2.el7.x86_64 #1 SMP Tue Dec 6 23:06:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux


How reproducible:
Everytime

Steps to Reproduce:
1. yum install -y epel-release
2. yum update -y epel-release
3. yum install -y python-demjson python-pip
4. Lint some invalid json
5. echo $?
6. yum erase -y python-demjson
7. pip install demjson
8. Lint the same invalid json
9. echo $?

Actual results:
[root@default-centos-7 ~]# jsonlint /etc/sensu/uchiwa.json 
/etc/sensu/uchiwa.json:22:12: Error: Values must be separated by a comma
   |  At line 22, column 12, offset 523
   |  Object started at line 18, column 16, offset 414
/etc/sensu/uchiwa.json:27:12: Error: Values must be separated by a comma
   |  At line 27, column 12, offset 680
   |  Object started at line 23, column 26, offset 567
/etc/sensu/uchiwa.json: has errors
[root@default-centos-7 ~]# echo $?
0


Expected results:
[root@default-centos-7 ~]# jsonlint /etc/sensu/uchiwa.json 
/etc/sensu/uchiwa.json:22:12: Error: Values must be separated by a comma
   |  At line 22, column 12, offset 523
   |  Object started at line 18, column 16, offset 414
/etc/sensu/uchiwa.json:27:12: Error: Values must be separated by a comma
   |  At line 27, column 12, offset 680
   |  Object started at line 23, column 26, offset 567
/etc/sensu/uchiwa.json: has errors
[root@default-centos-7 ~]# echo $?
1


Additional info

Comment 1 Fedora Update System 2021-02-02 23:28:44 UTC
FEDORA-EPEL-2021-769ea26237 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-769ea26237

Comment 2 Fedora Update System 2021-02-03 02:38:25 UTC
FEDORA-EPEL-2021-769ea26237 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-769ea26237

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 3 Fedora Update System 2021-02-17 05:05:58 UTC
FEDORA-EPEL-2021-769ea26237 has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.