Commit Graph

1 Commits

Author SHA1 Message Date
nico eaed97cf4f
utilize /etc/ directory
+ add config.py to read / touch create the etc config file

_read():
	tries to open the config files in read only mode to parse its contents.

_check():
	checks if the config file is present and then calls _read()
	if that is false it tries to touch create a new file.

	worst case scenario: file is present and holds content, the method assumes that the file isn't present. Therefore tries to touch-create a new file, if a file is against all odds present, only the mtime would be updated. Hence any file content would not be altered.

get():
	main method, calling _check()
	if a key is given return only the assigned value or None
	or return the whole dictionary
2020-02-03 20:49:52 +01:00