mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-31 10:26:39 +01:00
Updated to self method
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
95b53cc51c
commit
3a7f53c00b
2 changed files with 3 additions and 3 deletions
|
@ -690,7 +690,8 @@ class Initialization:
|
|||
for f in infiles:
|
||||
if os.path.isfile(f"{path}{f}"):
|
||||
# checking the encoding before read the file
|
||||
code = Utils.check_encoding(path, f)
|
||||
utils = Utils()
|
||||
code = utils.check_encoding(path, f)
|
||||
with open(path + f, "r", encoding=code) as in_f:
|
||||
for line in in_f:
|
||||
out_f.write(line)
|
||||
|
|
|
@ -102,8 +102,7 @@ class Utils:
|
|||
else:
|
||||
return file_name
|
||||
|
||||
@staticmethod
|
||||
def check_encoding(path, f):
|
||||
def check_encoding(self, path, f):
|
||||
"""Checking the file encoding default is utf-8
|
||||
"""
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue