[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] bootstrap_db
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-devel] bootstrap_db |
Date: |
Thu, 14 Nov 2002 20:31:13 +0100 |
User-agent: |
Mutt/1.3.22.1i |
> The natural solution would be to run psql from within the
> Python script via a pipe. But alas, contrary to the man page,
> psql does NOT return an errorlevel of 3 upon receiving an
> format definition error (bad SQL, usually) from the backend.
> Thus the Python script cannot reliably detect whether things
> failed or not (short of parsing the output for "ERROR" which
> is hardly elegant).
Strange. When running from a shell script it does not return
the correct error level. When running from a pipe within
Python it does. ??? Anyways, so this is the current solution.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346