Merge ~pjdc/influxdb-charm/+git/influxdb-charm:nagios-no-more-expanduser into influxdb-charm:master

Proposed by Paul Collins
Status: Merged
Merge reported by: Thomas Cuthbert
Merged at revision: 48ba41a7617a8b6a4fd1748da09256d88ce3f2ae
Proposed branch: ~pjdc/influxdb-charm/+git/influxdb-charm:nagios-no-more-expanduser
Merge into: influxdb-charm:master
Diff against target: 23 lines (+4/-1)
1 file modified
files/check_influxdb.py (+4/-1)
Reviewer Review Type Date Requested Status
InfluxDB Charmers Pending
Review via email: mp+335351@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/files/check_influxdb.py b/files/check_influxdb.py
2index 7a09658..cd2850b 100755
3--- a/files/check_influxdb.py
4+++ b/files/check_influxdb.py
5@@ -6,6 +6,7 @@
6
7 import json
8 import os
9+import pwd
10 import subprocess
11 import sys
12 import traceback
13@@ -13,7 +14,9 @@ import traceback
14
15 cmd = ['influx', '-execute', 'show diagnostics', '-format', 'json']
16
17-authf = os.path.join(os.path.expanduser('~'), '.influx-auth')
18+authf = os.path.join(
19+ pwd.getpwuid(os.getuid()).pw_dir,
20+ '.influx-auth')
21 username = None
22 password = None
23 if os.path.exists(authf):

Subscribers

People subscribed via source and target branches

to all changes: