From da336304d5bb0b8efe0f1c2afdc59c46c6a9d2a6 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Wed, 9 Oct 2019 08:00:34 -0400 Subject: Debug API and tests, add test --- src/config.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/config.py') diff --git a/src/config.py b/src/config.py index b59f79d..bd2366f 100755 --- a/src/config.py +++ b/src/config.py @@ -134,8 +134,13 @@ def write_theme(tmp_config,theme): f.close() -def apply(config_file,theme): +def apply(config_file,theme,dry=False): tmp=extract(config_file) write_theme(tmp,theme) - shutil.move(tmp,config_file) + f=open(tmp,mode="r") + new_config=f.read() + f.close() + if not(dry): + shutil.move(tmp,config_file) + return(new_config) -- cgit v1.2.3