mirror of https://git.48k.eu/ogcli/
remove whitespace printed after every command execution
The POST handling logic didn't check for empty responses before printing its contents resulting in a line of whitespace being written in the output of the program.master
parent
f26a8c3d23
commit
e92e38bcca
|
@ -47,7 +47,9 @@ class OgREST():
|
|||
r = requests.post(f'{self.URL}{path}',
|
||||
headers=self.HEADERS,
|
||||
json=payload)
|
||||
print(r.text)
|
||||
if r.text:
|
||||
print(r.text)
|
||||
|
||||
if r.status_code not in {200, 202}:
|
||||
sys.exit(f"Unsuccessful request to ogServer: "
|
||||
f"Response with {r.status_code} HTTP status code")
|
||||
|
|
Loading…
Reference in New Issue