-
-
Save Daviey/6edf198a996ba55a0167 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
from appdirs import site_config_dir | |
from appdirs import user_config_dir | |
BASE_CONFIG = '/bandit.yaml' | |
os.environ['XDG_CONFIG_DIRS'] = '/etc:/usr/local/etc' | |
config_dirs = (['.'] + [user_config_dir("bandit")] + | |
site_config_dir("bandit", multipath=True).split(':')) | |
config_locations = [s + BASE_CONFIG for s in config_dirs] | |
print config_locations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ubuntu:
['./bandit.yaml', '/home/dave/.config/bandit/bandit.yaml', '/etc/bandit/bandit.yaml', '/usr/local/etc/bandit/bandit.yaml']
Mac:
['./bandit.yaml', '/Users/mike/Library/Application Support/bandit/bandit.yaml', '/Library/Application Support/bandit/bandit.yaml'