From c5f70c4f2df1e0ff016bf6f433540ec60cdbd46a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 10 Mar 2020 17:28:09 +0100 Subject: [PATCH] hobo agent: cast postgresql dsn parts as strings (#40630) --- bijoe/hobo_agent/management/commands/hobo_deploy.py | 2 +- tests/test_hobo_deploy.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bijoe/hobo_agent/management/commands/hobo_deploy.py b/bijoe/hobo_agent/management/commands/hobo_deploy.py index 3947ca4..285605d 100644 --- a/bijoe/hobo_agent/management/commands/hobo_deploy.py +++ b/bijoe/hobo_agent/management/commands/hobo_deploy.py @@ -26,7 +26,7 @@ from django.conf import settings def pg_dsn_quote(value): - return "'%s'" % value.replace('\\', '\\\\').replace('\'', '\\\'') + return "'%s'" % str(value).replace('\\', '\\\\').replace('\'', '\\\'') def config_parser_quote(value): diff --git a/tests/test_hobo_deploy.py b/tests/test_hobo_deploy.py index 1d880e4..c661541 100644 --- a/tests/test_hobo_deploy.py +++ b/tests/test_hobo_deploy.py @@ -46,7 +46,7 @@ def test_deploy_specifics(tmpdir, settings, monkeypatch): 'HOST': 'hostname.zob.org', 'USER': 'hep', 'PASSWORD': 'a \'%fc', - 'PORT': '1234', + 'PORT': 1234, } } hobo_environment = {