From 3a7f53c00b9d4c6f99d8fb3a82b8dbfef0c6925c Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Wed, 15 Jan 2020 23:47:06 +0100 Subject: [PATCH] Updated to self method Signed-off-by: Dimitris Zlatanidis --- slpkg/init.py | 3 ++- slpkg/utils.py | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) 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: