Antilint
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Olivier 'reivilibre' 2021-08-15 20:10:43 +01:00
parent d8b2e87d89
commit e17afe178f
3 changed files with 8 additions and 7 deletions

View File

@ -3,7 +3,6 @@ import os
import pwd
import subprocess
import sys
from subprocess import PIPE
def cli():
@ -14,10 +13,11 @@ def cli():
database: str the name of the database to back up.
user: optional str the name of the Linux user to use to connect to Postgres.
Sudo or SSH will be used to make this happen, if it's specified.
Sudo or SSH will be used to make this happen, if it's specified,
unless it's a local user that is already the current user.
host: optional str if specified, the backup will be made using SSH (unless this host is the same as the one
named)
host: optional str if specified, the backup will be made using SSH
(unless this host is the same as the one named)
"""
request_info = json.load(sys.stdin)
assert isinstance(request_info, dict)
@ -68,8 +68,8 @@ def cli():
)
output_of_dump = lz4_process.stdin
# we MUST disable shell here otherwise the local side will do both the compression and decompression which would be
# silly!
# we MUST disable shell here otherwise the local side will do both
# the compression and decompression which would be silly!
subprocess.check_call(
command,
stdin=subprocess.DEVNULL,

View File

@ -9,7 +9,8 @@ class TestPostgresHelper(TestCase):
if "TEST_POSTGRES" not in os.environ:
self.skipTest(
"TEST_POSTGRES environment variable not set. "
"Should be set to a Postgres host, database, user combination, comma-separated."
"Should be set to a Postgres host, database,"
" user combination, comma-separated."
)
def test_helper_fails_on_bad_connection(self):