diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2019-10-09 08:00:34 -0400 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2019-10-09 08:00:34 -0400 |
| commit | da336304d5bb0b8efe0f1c2afdc59c46c6a9d2a6 (patch) | |
| tree | 1712d75759d624ee660845b3895003e24c5e5406 /src/config.py | |
| parent | 5ca2e63ea66095fbe64cdc441f6eec663fb28bd4 (diff) | |
Debug API and tests, add test
Diffstat (limited to 'src/config.py')
| -rwxr-xr-x | src/config.py | 9 |
1 files changed, 7 insertions, 2 deletions
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) |
