Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XDG support #190

Merged
merged 2 commits into from
Feb 7, 2015
Merged

XDG support #190

merged 2 commits into from
Feb 7, 2015

Conversation

mathstuf
Copy link
Contributor

@mathstuf mathstuf commented Feb 6, 2015

Adds support for XDG_CONFIG_HOME storage of the configuration file with fallback to the original file.

Prefers the XDG paths if they exist, but falls back to ~/.bugwarriorrc
if it exists.
@ralphbean
Copy link
Collaborator

I don't think the fallback works correctly. This returns None on my system:

BaseDirectory.load_first_config('bugwarrior')

So that means that this fails:

>>> os.path.join(BaseDirectory.load_first_config('bugwarrior'), 'bugwarriorrc')
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/usr/lib64/python2.7/posixpath.py", line 77, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

@mathstuf
Copy link
Contributor Author

mathstuf commented Feb 7, 2015

Oh, oops. Fix incoming.

Just call the file by its basename.
@ralphbean
Copy link
Collaborator

WFM.

ralphbean added a commit that referenced this pull request Feb 7, 2015
@ralphbean ralphbean merged commit ce5b8ff into GothenburgBitFactory:develop Feb 7, 2015
@mathstuf mathstuf deleted the xdg-support branch February 7, 2015 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants