Skip to content

Commit

Permalink
test_basic_test_strace_non_existing_file(): make it compatible of exc…
Browse files Browse the repository at this point in the history
…eptions
  • Loading branch information
rouault committed Mar 18, 2023
1 parent 9d423fa commit a061ad0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions autotest/gcore/basic_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ def test_basic_test_strace_non_existing_file():

python_exe = sys.executable
cmd = 'strace -f %s -c "from osgeo import gdal; ' % python_exe + (
"gdal.OpenEx('non_existing_ds', gdal.OF_RASTER)" ' " '
"gdal.DontUseExceptions(); gdal.OpenEx('non_existing_ds', gdal.OF_RASTER)" ' " '
)
try:
(_, err) = gdaltest.runexternal_out_and_err(cmd)
except Exception:
(_, err) = gdaltest.runexternal_out_and_err(cmd, encoding="UTF-8")
except Exception as e:
# strace not available
pytest.skip()
pytest.skip(str(e))

interesting_lines = []
for line in err.split("\n"):
Expand Down

0 comments on commit a061ad0

Please sign in to comment.