Ticket #446: patch_2.patch

File patch_2.patch, 1.6 KB (added by anonymous, 4 years ago)
  • email2trac

    old new  
    11311131                tkt.save_changes(self.author, body_text, when, None, str(cnum))
    11321132
    11331133        if not spam:
    1134             if self.parameters.use_trac_notification
     1134            if self.parameters.use_trac_notification:
    11351135                # use trac native notification system
    11361136                event = TicketChangeEvent( 'changed', tkt, when, self.author, 'email2trac' )
    11371137                NotificationSystem( self.env ).notify( event )
     
    13971397                tkt.save_changes(tkt['reporter'], comment)
    13981398
    13991399        if not spam:
    1400             if self.parameters.use_trac_notification
     1400            if self.parameters.use_trac_notification:
    14011401                # use trac native notification system
    14021402                event = TicketChangeEvent( 'changed', tkt, when, self.author, 'email2trac' )
    14031403                NotificationSystem( self.env ).notify( event )
    (this hunk was shorter than expected) 
    18231823            self.save_email_for_debug(m, self.parameters.project_name, True)
    18241824
    18251825        #self.db = self.env.get_read_db()
    1826         self.db = self.env.db_query()
     1826        #self.db = self.env.db_query()
     1827        with self.env.db_query as db:
     1828            self.logger.debug('Main function parse: type(db) = [%s]' %( type(db) ) )
    18271829
    18281830        self.get_sender_info(m)
    18291831
     
    29172920
    29182921            settings.use_trac_notification = False
    29192922
    2920         elif version in  [ '1.3', '1.4' ]
     2923        elif version in  [ '1.3', '1.4' ]:
    29212924
    29222925            from trac import attachment
    29232926            from trac import config as trac_config