From 2f90fe4ea40d47ff44c60c82cc887574c4e02b28 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Fri, 24 Jan 2020 13:38:26 -0600 Subject: Remove using of `missing_ok` This is to be compatible with python 3.6 & 3.7 --- config_file/config_file.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'config_file') diff --git a/config_file/config_file.py b/config_file/config_file.py index b090ace..5827d08 100644 --- a/config_file/config_file.py +++ b/config_file/config_file.py @@ -118,7 +118,11 @@ class ConfigFile: if not Path(original_file_path).exists(): raise OSError(f"The {original_file_path} file to reset to does not exist.") - Path(self.path).expanduser().unlink(missing_ok=True) + try: + Path(self.path).expanduser().unlink() + except OSError: + pass + copyfile(original_file_path, self.path) self.contents = self.__read_config_file() -- cgit v1.2.3 From 6c99e193247760335aeab1f8958de2dcf7a037ac Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Fri, 24 Jan 2020 13:41:55 -0600 Subject: =?UTF-8?q?Bump=20version:=200.5.0=20=E2=86=92=200.6.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config_file/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config_file') diff --git a/config_file/__init__.py b/config_file/__init__.py index 22164c1..5917edd 100644 --- a/config_file/__init__.py +++ b/config_file/__init__.py @@ -1,7 +1,7 @@ from config_file.config_file import ConfigFile from config_file.parsers.base_parser import BaseParser, ParsingError -__version__ = "0.5.0" +__version__ = "0.6.0" __all__ = [ "ConfigFile", -- cgit v1.2.3