VirtualMailManager/handler.py
branchv0.7.x
changeset 653 cf07e4468934
parent 649 08837f3fbced
child 670 f374ef062c94
--- a/VirtualMailManager/handler.py	Sun Nov 25 14:37:09 2012 +0000
+++ b/VirtualMailManager/handler.py	Sun Nov 25 17:06:17 2012 +0000
@@ -283,7 +283,7 @@
         """
         if lisdir(directory):
             return Popen([self._cfg.dget('bin.du'), "-hs", directory],
-                         stdout=PIPE).communicate()[0].split('\t')[0]
+                         stdout=PIPE).communicate()[0].decode().split('\t')[0]
         else:
             self._warnings.append(_('No such directory: %s') % directory)
             return 0
@@ -525,7 +525,7 @@
         dominfo = dom.get_info()
         if dominfo['domain name'].startswith('xn--'):
             dominfo['domain name'] += ' (%s)' % \
-                                      dominfo['domain name'].decode('idna')
+                         dominfo['domain name'].encode('utf-8').decode('idna')
         if details is None:
             return dominfo
         elif details == 'accounts':