Skip to content

Commit

Permalink
Patchwork: Handle simplejson/json compat
Browse files Browse the repository at this point in the history
Catch exceptions by the correct name if simplejson is in use.

Signed-off-by: Kees Cook <[email protected]>
  • Loading branch information
kees authored and kuba-moo committed Sep 27, 2022
1 parent 9478092 commit 7e6b6e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pw/patchwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
#
# Copyright (C) 2019 Netronome Systems, Inc.

import json
try:
import simplejson as json
except ImportError:
import json
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
Expand Down

0 comments on commit 7e6b6e6

Please sign in to comment.