A ticket can be created and still have errors
I'm creating a ticket with a customfield that doesn't exist on the queue in question. RT replies like this:
RT/4.2.12 200 Ok
# Invalid custom field name (bla)
# Ticket 109138 created.
# Ticket 109138 updated.
The regular expression setting "res" works on "# Invalid custom field name (bla)" and becomes None. But the ticket was created, meaning the return value (-1) from create_ticket is not to be trusted. See patch for a suggested solution: rt.py.patch