From b8e0c11ceb87f4dd7a8f95d74800adaec633b16c Mon Sep 17 00:00:00 2001 From: Shawn Davis Date: Thu, 18 Apr 2024 18:51:33 -0500 Subject: [PATCH] Added pgsql command for executing raw SQL. --- scripttease/lib/commands/pgsql.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripttease/lib/commands/pgsql.py b/scripttease/lib/commands/pgsql.py index 61b5f88..8f2f873 100644 --- a/scripttease/lib/commands/pgsql.py +++ b/scripttease/lib/commands/pgsql.py @@ -57,7 +57,8 @@ def pgsql(command, *args, excluded_kwargs=None, host="localhost", password=None, a = list() - if password is not None: + # Password may be None or an empty string. + if password: a.append('export PGPASSWORD="%s" &&' % password) a.append(command)