Browse Source

fix config file path list

Signed-off-by: R4SAS <r4sas@i2pmail.org>
pull/34/head
R4SAS 3 years ago
parent
commit
3c2cdb10ac
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2
  1. 8
      pbincli/cli.py

8
pbincli/cli.py

@ -7,10 +7,14 @@ from pbincli.utils import PBinCLIException, PBinCLIError, validate_url @@ -7,10 +7,14 @@ from pbincli.utils import PBinCLIException, PBinCLIError, validate_url
CONFIG_PATHS = [
os.path.join(".", "pbincli.conf", ),
os.path.join(os.getenv("HOME") or "~", ".config", "pbincli", "pbincli.conf"),
os.path.join(os.getenv("APPDATA"), "pbincli", "pbincli.conf"),
os.path.join(os.getenv("HOME") or "~", ".config", "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):
"""Read config variables from a file"""
settings = {}

Loading…
Cancel
Save