Commit 6705f66
committed
Fix Stripe interception in Python 2.
Previously this failed with:
AttributeError: 'NoneType' object has no attribute 'path'
Seems to be because Python 2 loses all imports when we delete
sys.modules['stripe'] to reset it, even for the code still
running in that module (!). Tested with 2.7.15+. Now works
both with that & Python 3.6.8.1 parent 2aaa9bb commit 6705f66
1 file changed
+9
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
| |||
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
18 | | - | |
19 | 21 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
0 commit comments