Skip to content

Commit 311c86c

Browse files
committed
misra.py: replaced deprecated codecs.open() with open()
``` DeprecationWarning: codecs.open() is deprecated. Use open() instead. ```
1 parent e277b4e commit 311c86c

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

addons/misra.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import re
2323
import os
2424
import argparse
25-
import codecs
2625
import string
2726
import copy
2827

@@ -4525,7 +4524,7 @@ def loadRuleTexts(self, filename):
45254524
encodings = ['ascii', 'utf-8', 'windows-1250', 'windows-1252']
45264525
for e in encodings:
45274526
try:
4528-
file_stream = codecs.open(filename, 'r', encoding=e)
4527+
file_stream = open(filename, 'r', encoding=e)
45294528
file_stream.readlines()
45304529
file_stream.seek(0)
45314530
except UnicodeDecodeError:

0 commit comments

Comments
 (0)