Skip to content

Commit

Permalink
Use os.path.expanduser() in EdgeGridPlugin.get_auth() instead of HOME
Browse files Browse the repository at this point in the history
environment variable for wider detection options (including Win32
compatibility)
  • Loading branch information
lufo0 committed Jun 12, 2016
1 parent 1571a34 commit f9f32d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions httpie_edgegrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class EdgeGridPlugin(AuthPlugin):
description = ''

def get_auth(self, username, password):
home = os.environ['HOME']
rc = EdgeRc("%s/.edgerc" % home)
rc_path = os.path.expanduser("~/.edgerc")
rc = EdgeRc(rc_path)

if not rc.has_section(username):
err_msg = "\nERROR: No section named '%s' was found in your .edgerc file\n" % username
Expand Down

0 comments on commit f9f32d5

Please sign in to comment.