Skip to content

Commit 0195f14

Browse files
committed
Fix python 3.9 compatibility
Fixes #233
1 parent af0a57e commit 0195f14

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

InteractiveHtmlBom/ecad/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def get_parser_by_extension(file_name, config, logger):
1010
import io
1111
import json
1212
with io.open(file_name, 'r', encoding='utf-8') as f:
13-
obj = json.load(f, encoding='utf-8')
13+
obj = json.load(f)
1414
if 'pcbdata' in obj:
1515
return get_generic_json_parser(file_name, config, logger)
1616
else:

InteractiveHtmlBom/ecad/easyeda.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class EasyEdaParser(EcadParser):
2525
def get_easyeda_pcb(self):
2626
import json
2727
with io.open(self.file_name, 'r', encoding='utf-8') as f:
28-
return json.load(f, encoding='utf-8')
28+
return json.load(f)
2929

3030
@staticmethod
3131
def tilda_split(s):

InteractiveHtmlBom/ecad/genericjson.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class GenericJsonParser(EcadParser):
1111
def get_generic_json_pcb(self):
1212
from os import path
1313
with io.open(self.file_name, 'r', encoding='utf-8') as f:
14-
pcb = json.load(f, encoding='utf-8')
14+
pcb = json.load(f)
1515

1616
if 'spec_version' not in pcb:
1717
raise ValidationError("'spec_version' is a required property")
@@ -26,7 +26,7 @@ def get_generic_json_pcb(self):
2626
.format(pcb['spec_version']))
2727

2828
with io.open(schema_file_name, 'r', encoding='utf-8') as f:
29-
schema = json.load(f, encoding='utf-8')
29+
schema = json.load(f)
3030

3131
validate(instance=pcb, schema=schema)
3232

0 commit comments

Comments
 (0)