Skip to content

Commit

Permalink
Strip newline when reading .vault-token
Browse files Browse the repository at this point in the history
Fixes #32
  • Loading branch information
jhaals authored Jan 27, 2017
1 parent e96c11e commit 4d07076
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def run(self, terms, inject=None, variables=None, **kwargs):
if not token:
try:
with open(os.path.join(os.getenv('HOME'), '.vault-token')) as file:
token = file.read()
token = file.read().strip()
except IOError:
# token not found in file is same case below as not found in env var
pass
Expand Down

0 comments on commit 4d07076

Please sign in to comment.