Modify ↓
#159 closed setup (worksforme)
update ticket problem and sample solution
Reported by: | tomasz.kloc@… | Owned by: | bas |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | email2trac | Version: | trunk |
Keywords: | update_ticket | Cc: |
Description
Hi,
I'm using trunk version of Your plugin with Trac 0.11 and Postfix.
Create ticket via e-mail works great, but when i try to reply(update) ticket i got following error:
email2trac: Traceback (most recent call last): email2trac: File "/usr/local/bin/email2trac", line 1616, in ? tktparser.parse(sys.stdin) email2trac: File "/usr/local/bin/email2trac", line 992, in parse self.ticket_update(m, result.group('reply'), spam_msg) email2trac: File "/usr/local/bin/email2trac", line 705, in ticket_update tkt.save_changes(self.author, body_text, when, None, str( email2trac: File "/usr/lib/python2.4/site-packages/trac-0.10.4-py2.4.egg/trac/ticket/model.py", line 197, in save_changes when = i e()) email2trac: TypeError: int() argument must be a string or a number
My quick fix:
$ diff email2trac.py.in.orig email2trac.py.in 704a705,708 > try: > int(when) > except ValueError: > when = time.mktime(when.timetuple())
i've used "try" block, because i wasn't sure if 'when' will always be a datetime.datetime instance.
Attachments (0)
Change History (3)
comment:1 Changed 14 years ago by bas
- Status changed from new to assigned
- Type changed from defect to setup
- Version changed from 1.0.0 to trunk
comment:2 Changed 13 years ago by bas
- Resolution set to worksforme
- Status changed from assigned to closed
No answer
Note: See
TracTickets for help on using
tickets.
Thanks for reporting. Did you specify the trac version in the /etc/email2trac.conf:
If is is unset then the default version is used and that is 0.11 and i see that you use 0.10. So specify this version in your email2trac.conf instead of 0.11