File: boto.patch

package info (click to toggle)
rasterio 1.3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 22,092 kB
  • sloc: python: 19,840; makefile: 276; sh: 164
file content (21 lines) | stat: -rw-r--r-- 596 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: Fix ImportError with unreachable http_proxy.
Author: Bas Couwenberg <sebastic@debian.org>
Forwarded: https://github.com/rasterio/rasterio/pull/2737

--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -27,8 +27,13 @@ DEFAULT_SHAPE = (10, 10)
 if sys.version_info > (3,):
     reduce = functools.reduce
 
+try:
+    have_credentials = boto3.Session().get_credentials()
+except Exception:
+    have_credentials = False
+
 credentials = pytest.mark.skipif(
-    not(boto3.Session().get_credentials()),
+    not(have_credentials),
     reason="S3 raster access requires credentials")