Ah, sorry, I think we got our wires crossed here. There's no point throwing this exception if we're just going to catch it straight away. The right code here would be:

```python
try:
    cookiejar.update(cookies)
except AttributeError:
    for cookie_in_jar in cookies:
        cookierjar.set_cookie(cookie_in_jar)
```