diff --git a/kube-stale-resources.py b/kube-stale-resources.py index e547d62..ceea38e 100644 --- a/kube-stale-resources.py +++ b/kube-stale-resources.py @@ -136,14 +136,14 @@ def main(): if args.blacklist_file: print(f'Reading blacklist file {args.blacklist_file}...') - with open(args.blacklist_file, 'r') as f: + with open(args.blacklist_file, 'r', encoding='utf-8') as f: blacklist_regexs += list(filter(lambda x: not re.match(r'^\s*$', x), f.read().split('\n'))) print('Retrieving target state...') if args.target_manifests_file == '-': target_tuples = get_target_namespaced_resources(sys.stdin) else: - with open(args.target_manifests_file, 'r') as f: + with open(args.target_manifests_file, 'r', encoding='utf-8') as f: target_tuples = get_target_namespaced_resources(f) print(f'Retrieving live state from {args.k8s_apiserver_url}...') diff --git a/pyproject.toml b/pyproject.toml index 5f2e8bb..154aa64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ requests = "~2.26" [tool.poetry.dev-dependencies] mypy = "0.910" -pylint = "~2.9" +pylint = "~2.10" rope = "~0.19" types-PyYAML = "~5.4" types-requests = "~2.25"