VirtualMailManager/handler.py
branchv0.7.x
changeset 711 2a75058fc064
parent 694 b1bfd4d1d9c0
parent 703 58815c004a61
child 727 695426b49de0
equal deleted inserted replaced
700:0a06f7b1da6a 711:2a75058fc064
     1 # -*- coding: UTF-8 -*-
     1 # -*- coding: UTF-8 -*-
     2 # Copyright (c) 2007 - 2013, Pascal Volk
     2 # Copyright (c) 2007 - 2014, Pascal Volk
     3 # See COPYING for distribution information.
     3 # See COPYING for distribution information.
     4 """
     4 """
     5    VirtualMailManager.handler
     5    VirtualMailManager.handler
     6    ~~~~~~~~~~~~~~~~~~~~~~~~~~
     6    ~~~~~~~~~~~~~~~~~~~~~~~~~~
     7 
     7 
   473                            'relocated', 'catchall']:
   473                            'relocated', 'catchall']:
   474             raise VMMError(_("Invalid argument: '%s'") % details,
   474             raise VMMError(_("Invalid argument: '%s'") % details,
   475                            INVALID_ARGUMENT)
   475                            INVALID_ARGUMENT)
   476         dom = self._get_domain(domainname)
   476         dom = self._get_domain(domainname)
   477         dominfo = dom.get_info()
   477         dominfo = dom.get_info()
   478         if dominfo['domain name'].startswith('xn--'):
   478         if dominfo['domain name'].startswith('xn--') or \
       
   479            dominfo['domain name'].count('.xn--'):
   479             dominfo['domain name'] += ' (%s)' % \
   480             dominfo['domain name'] += ' (%s)' % \
   480                          dominfo['domain name'].encode('utf-8').decode('idna')
   481                          dominfo['domain name'].encode('utf-8').decode('idna')
   481         if details is None:
   482         if details is None:
   482             return dominfo
   483             return dominfo
   483         elif details == 'accounts':
   484         elif details == 'accounts':