Changeset: b87fb6cce3e5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/b87fb6cce3e5
Modified Files:
        sql/odbc/tests/Tests/ODBCconnect.py
Branch: Aug2024
Log Message:

Print more info when ODBCconnect.py fails


diffs (19 lines):

diff --git a/sql/odbc/tests/Tests/ODBCconnect.py 
b/sql/odbc/tests/Tests/ODBCconnect.py
--- a/sql/odbc/tests/Tests/ODBCconnect.py
+++ b/sql/odbc/tests/Tests/ODBCconnect.py
@@ -118,6 +118,15 @@ def show_context():
         print(ex.report(), file=sys.stderr)
         if list_output:
             print(f'\n--- output of odbcconnect -l ---\n{list_output}--- end 
---', file=sys.stderr)
+        odbcini = os.getenv('ODBCINI', 'odbc.ini')
+        sysini = os.getenv('ODBCSYSINI', os.getenv('TSTTRGDIR'))
+        fullpath = os.path.join(sysini, odbcini)
+        try:
+            with open(fullpath) as f:
+                content = f.read()
+                print(f'\n--- content of {fullpath} ---\n{content}\n--- end 
---', file=sys.stderr)
+        except FileNotFoundError:
+            pass
 
 
 #######################################################################
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to