Commit 54182c1
authored
fix: make logging handler close conditional to having the transport opened (#990)
There was a recent release (3.12.0) that included the changes introduced in
#917. The newly introduced close method seems to be called by AppEngine
Python runtime at shutdown, so if you would call it explicitly before the runtime
does it, then the close function throws an exception because transport is None.1 parent dd1642c commit 54182c1
File tree
2 files changed
+8
-3
lines changed- packages/google-cloud-logging
- google/cloud/logging_v2/handlers
- tests/unit/handlers
2 files changed
+8
-3
lines changedLines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
249 | | - | |
250 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
251 | 252 | | |
252 | 253 | | |
253 | 254 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
901 | 901 | | |
902 | 902 | | |
903 | 903 | | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
904 | 908 | | |
905 | 909 | | |
906 | 910 | | |
| |||
0 commit comments