Ignore:
Timestamp:
12/27/12 08:04:59 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The exception strings are converted from UTF-8 to unicode for proper logging (re #170)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/singleton.py

    r298 r401  
     1
     2from util import utf2unicode
    13
    24import os
     
    7274                                print "singleton._PipeServer.run: failed to read from the pipe"
    7375                    except Exception, e:
    74                         print "singleton._PipeServer.run: exception:", str(e)
     76                        print "singleton._PipeServer.run: exception:",
     77                        print utf2unicode(str(e))
    7578                    finally:
    7679                        win32pipe.DisconnectNamedPipe(handle)
    7780                        win32file.CloseHandle(handle)
    7881            except Exception, e:
    79                 print "singleton._PipeServer.run: fatal exception:", str(e)
     82                print "singleton._PipeServer.run: fatal exception:",
     83                print utf2unicode(str(e))
    8084                           
    8185        def _createPipe(self):
     
    141145                    return
    142146                except Exception, e:
    143                     print "SingleInstance._notifySingleton: failed:", str(e)
     147                    print "SingleInstance._notifySingleton: failed:",
     148                    print utf2unicode(str(e))
    144149                    time.sleep(0.5)
    145150       
     
    190195                    self._raiseCallback()
    191196            except Exception, e:
    192                 print "singleton._SocketServer.run: fatal exception:", str(e)           
     197                print "singleton._SocketServer.run: fatal exception:",
     198                print utf2unicode(str(e))
    193199   
    194200    class SingleInstance(object):
     
    254260                    return
    255261                except Exception, e:
    256                     print "singleton.SingleInstance._notifySingleton: failed:", str(e)
     262                    print "singleton.SingleInstance._notifySingleton: failed:",
     263                    print utf2unicode(str(e))
    257264                    time.sleep(0.5)
    258265
Note: See TracChangeset for help on using the changeset viewer.