Skip to content

Commit 1a116d9

Browse files
author
Grégory Starck
committed
workaround: last influxd master doesn't anymore store a log file
unfortunately :s So don't error if it's not readable. For now keeping the code for the log file as it might be reintroduced later.
1 parent 00913fa commit 1a116d9

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

tests/influxdb/client_test_with_server.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,17 @@ def __init__(self, conf_template):
180180

181181
def get_logs_and_output(self):
182182
proc = self.proc
183-
with open(self.logs_file) as fh:
184-
return {
185-
'rc': proc.returncode,
186-
'out': proc.stdout.read(),
187-
'err': proc.stderr.read(),
188-
'logs': fh.read()
189-
}
183+
try:
184+
with open(self.logs_file) as fh:
185+
logs = fh.read()
186+
except IOError as err:
187+
logs = "Couldn't read logs: %s" % err
188+
return {
189+
'rc': proc.returncode,
190+
'out': proc.stdout.read(),
191+
'err': proc.stderr.read(),
192+
'logs': logs
193+
}
190194

191195
def close(self, remove_tree=True):
192196
self.proc.terminate()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy