mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-05 11:02:14 +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:
|
for f in infiles:
|
||||||
if os.path.isfile(f"{path}{f}"):
|
if os.path.isfile(f"{path}{f}"):
|
||||||
# checking the encoding before read the file
|
# 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:
|
with open(path + f, "r", encoding=code) as in_f:
|
||||||
for line in in_f:
|
for line in in_f:
|
||||||
out_f.write(line)
|
out_f.write(line)
|
||||||
|
|
|
@ -102,8 +102,7 @@ class Utils:
|
||||||
else:
|
else:
|
||||||
return file_name
|
return file_name
|
||||||
|
|
||||||
@staticmethod
|
def check_encoding(self, path, f):
|
||||||
def check_encoding(path, f):
|
|
||||||
"""Checking the file encoding default is utf-8
|
"""Checking the file encoding default is utf-8
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue