Skip to content

Commit

Permalink
get rules: rufiles read encoding utf8
Browse files Browse the repository at this point in the history
  • Loading branch information
timurhai committed Oct 1, 2024
1 parent 787640f commit dfc6bd9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/python/cgrules.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def getRules(i_path = None, i_verbose = False):
print('File: "%s"' % afile)

try:
fobj = open(afile, 'r')
fobj = open(afile, 'r', encoding="utf-8")
except:
print(traceback.format_exc())
continue
Expand All @@ -120,6 +120,7 @@ def getRules(i_path = None, i_verbose = False):
try:
obj = json.load(fobj)
except:
print('Error reading "%s"' % afile)
print(traceback.format_exc())
continue

Expand Down

0 comments on commit dfc6bd9

Please sign in to comment.