Skip to content

Commit 774ba14

Browse files
author
Jonathan, Lutterbeck
committed
removed print statements
Print statements have been removed and replaced them with RuntimeErrors where applicable. which_path was renamed to default_config_path.
1 parent 8d38150 commit 774ba14

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

examples/configloader.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
import pathlib
66

77

8-
9-
def which_path():
8+
def default_config_path():
109
"""
1110
1211
this checks the operation system of the user.
@@ -32,7 +31,7 @@ def which_path():
3231
if not os.path.exists(path):
3332
os.makedirs(path)
3433
else:
35-
print("Operating System not supported")
34+
raise RuntimeError("Operating sytem not supported")
3635

3736
return path
3837

@@ -41,13 +40,11 @@ def create_config(path):
4140
"""
4241
this will copy the currently used config file in the standard folder
4342
"""
44-
syspath = which_path() + "/config.yaml"
43+
syspath = default_config_path() + "/config.yaml"
4544
shutil.copyfile(path, syspath)
46-
print(f"New config file created, edit config file at: {syspath}")
4745

4846

4947
def load_config(path):
50-
5148
"""
5249
First checking "path" to match minimum length and other requirements.
5350

0 commit comments

Comments
 (0)