Changeset 273


Ignore:
Timestamp:
07/28/09 00:47:59 (8 years ago)
Author:
marc
Message:

Better error handling for Py.2.6 and twisted

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/error.py

    r271 r273  
    2828    """ 
    2929 
    30     def __init__(self, message): 
     30    def __init__(self, value): 
    3131        """ 
    3232        Constructor 
    3333 
    34         @type message: str 
    35         @param message: Exception message 
     34        @type value: str 
     35        @param value: Exception value 
    3636        """ 
    3737 
    38         self.message = message 
     38        self.value = value 
    3939 
    4040    def __str__(self): 
     
    4343 
    4444        @rtype: str 
    45         @return: String representation of Exception message 
     45        @return: String representation of Exception value 
    4646        """ 
    4747 
    48         return repr(self.message) 
     48        return repr(self.value) 
    4949 
    5050 
  • trunk/uigtk.py

    r271 r273  
    11501150            self.server.start_server(self.configuration['server']['port']) 
    11511151        except error.ItakaServerErrorCannotListen, e: 
    1152             self.log.failure(('Gui', 'start_server'), (_('Failed to start server'), _('Failed to start server: %s') % (e)), 'ERROR') 
     1152            self.log.failure(('Gui', 'start_server'), (_('Failed to start server: %s' % e.value), _('Failed to start server: %s') % e.value), 'ERROR') 
    11531153            self.button_start_stop.set_active(False) 
    11541154            return 
     
    11561156        self.server.add_log_observer(self.log.twisted_observer) 
    11571157 
    1158         if self.configuration['server']['authentication']: 
     1158        if self.configuration['server']['authytentication']: 
    11591159            serverstock = 'STOCK_DIALOG_AUTHENTICATION' 
    11601160            serverstring = _('Secure server') 
Note: See TracChangeset for help on using the changeset viewer.