Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/general.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-11-20 22:21:00 +0000
committerGitHub <noreply@github.com>2021-11-20 22:21:00 +0000
commit66e23af42290cf998b966523d4520a2110b0806b (patch)
tree5dcc6c9b47cf9cf6ecafb47fbe717c2581133c1e /archinstall/lib/general.py
parent627b6b5207beffee2ed9507933cebe780c62a11d (diff)
parent91d030a09c26f56ece0de72e3536ad31d48595ec (diff)
Merge PR #739 - Added @staticmethod decorators
source code improvement
Diffstat (limited to 'archinstall/lib/general.py')
-rw-r--r--archinstall/lib/general.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py
index ee088d4f..a057af5a 100644
--- a/archinstall/lib/general.py
+++ b/archinstall/lib/general.py
@@ -76,6 +76,7 @@ def json_dumps(*args, **kwargs):
return json.dumps(*args, **{**kwargs, 'cls': JSON})
class JsonEncoder:
+ @staticmethod
def _encode(obj):
"""
This JSON encoder function will try it's best to convert
@@ -112,6 +113,7 @@ class JsonEncoder:
else:
return obj
+ @staticmethod
def _unsafe_encode(obj):
"""
Same as _encode() but it keeps dictionary keys starting with !