forked from openwrt/packages
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bigclown-gateway: use Python's json lib
From: hardwario/bch-gateway#17 Signed-off-by: Alexandru Ardelean <[email protected]>
- Loading branch information
Showing
2 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...gclown/bigclown-gateway/patches/0001-bcg-gateway-use-Python-s-built-in-json-library.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
From 0d9251aa4b7f925c908c048ae2eab123acab32d6 Mon Sep 17 00:00:00 2001 | ||
From: Alexandru Ardelean <[email protected]> | ||
Date: Wed, 16 Mar 2022 09:46:03 +0200 | ||
Subject: [PATCH] bcg: gateway: use Python's built-in json library | ||
|
||
This reduces the dependency list by one, since Python has a built-in JSON | ||
library with the same API. | ||
|
||
Signed-off-by: Alexandru Ardelean <[email protected]> | ||
--- | ||
bcg/gateway.py | 2 +- | ||
requirements.txt | 1 - | ||
2 files changed, 1 insertion(+), 2 deletions(-) | ||
|
||
diff --git a/bcg/gateway.py b/bcg/gateway.py | ||
index 818200e..b1da5ce 100755 | ||
--- a/bcg/gateway.py | ||
+++ b/bcg/gateway.py | ||
@@ -3,7 +3,7 @@ | ||
import os | ||
import time | ||
import logging | ||
-import simplejson as json | ||
+import json | ||
import platform | ||
import socket | ||
import decimal | ||
diff --git a/requirements.txt b/requirements.txt | ||
index d9a0475..43763db 100644 | ||
--- a/requirements.txt | ||
+++ b/requirements.txt | ||
@@ -3,6 +3,5 @@ click-log>=0.2.1 | ||
paho-mqtt>=1.0 # deb:python3-paho-mqtt>=1.0 | ||
pyserial>=3.0 # deb:python3-serial>=3.0 | ||
PyYAML>=3.11 # deb:python3-yaml>=3.11 | ||
-simplejson>=3.6.0 # deb:python3-simplejson>=3.6.0 | ||
schema>=0.6 | ||
appdirs>=1.0 | ||
-- | ||
2.34.1 | ||
|