forked from r4sas/PBinCLI
fix config file path list
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
28f7c09f83
commit
3c2cdb10ac
@ -7,10 +7,14 @@ from pbincli.utils import PBinCLIException, PBinCLIError, validate_url
|
|||||||
|
|
||||||
CONFIG_PATHS = [
|
CONFIG_PATHS = [
|
||||||
os.path.join(".", "pbincli.conf", ),
|
os.path.join(".", "pbincli.conf", ),
|
||||||
os.path.join(os.getenv("HOME") or "~", ".config", "pbincli", "pbincli.conf"),
|
os.path.join(os.getenv("HOME") or "~", ".config", "pbincli", "pbincli.conf")
|
||||||
os.path.join(os.getenv("APPDATA"), "pbincli", "pbincli.conf"),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if sys.platform == "win32":
|
||||||
|
CONFIG_PATHS.append(os.path.join(os.getenv("APPDATA"), "pbincli", "pbincli.conf"))
|
||||||
|
elif sys.platform == "darwin":
|
||||||
|
CONFIG_PATHS.append(os.path.join(os.getenv("HOME") or "~", "Library", "Application Support", "pbincli", "pbincli.conf"))
|
||||||
|
|
||||||
def read_config(filename):
|
def read_config(filename):
|
||||||
"""Read config variables from a file"""
|
"""Read config variables from a file"""
|
||||||
settings = {}
|
settings = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user