A no-op uploader that makes affordance for fault injection.
| 15 | |
| 16 | |
| 17 | class FakeUploader(object): |
| 18 | """A no-op uploader that makes affordance for fault injection.""" |
| 19 | |
| 20 | def __call__(self, tpart): |
| 21 | if tpart._explosive: |
| 22 | raise tpart._explosive |
| 23 | |
| 24 | return tpart |
| 25 | |
| 26 | |
| 27 | class Explosion(Exception): |