Commit cf12b88
Matthew Fisher
fix(create_bucket): check for existence of None
There are small implications between `if not x` and `if x is None` in
Python:
- `if not x` checks if the value is false (empty list, `None`, `False`)
- `if x is None` checks if x is equal to the literal value `None`.
conn.lookup returns `None` if no bucket exists. This code is explicitly
stated in their docs as the proper way to check if a bucket does not
exist.
See: http://boto.readthedocs.org/en/latest/s3_tut.html1 parent d4673ea commit cf12b88
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
0 commit comments