diff --git a/slpkg/init.py b/slpkg/init.py index ec716b1c..935b3a46 100644 --- a/slpkg/init.py +++ b/slpkg/init.py @@ -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) diff --git a/slpkg/utils.py b/slpkg/utils.py index fd9b28af..b3be5dd2 100644 --- a/slpkg/utils.py +++ b/slpkg/utils.py @@ -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: