File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 5
5
import pathlib
6
6
7
7
8
-
9
- def which_path ():
8
+ def default_config_path ():
10
9
"""
11
10
12
11
this checks the operation system of the user.
@@ -32,7 +31,7 @@ def which_path():
32
31
if not os .path .exists (path ):
33
32
os .makedirs (path )
34
33
else :
35
- print ("Operating System not supported" )
34
+ raise RuntimeError ("Operating sytem not supported" )
36
35
37
36
return path
38
37
@@ -41,13 +40,11 @@ def create_config(path):
41
40
"""
42
41
this will copy the currently used config file in the standard folder
43
42
"""
44
- syspath = which_path () + "/config.yaml"
43
+ syspath = default_config_path () + "/config.yaml"
45
44
shutil .copyfile (path , syspath )
46
- print (f"New config file created, edit config file at: { syspath } " )
47
45
48
46
49
47
def load_config (path ):
50
-
51
48
"""
52
49
First checking "path" to match minimum length and other requirements.
53
50
You can’t perform that action at this time.
0 commit comments