# Path: Wammu/Locales.py
# def StrConv(txt):
#     """
#     This function coverts something (txt) to string form usable by wxPython. There
#     is problem that in default configuration in most distros (maybe all) default
#     encoding for unicode objects is ascii. This leads to exception when converting
#     something different than ascii. And this exception is not catched inside
#     wxPython and leads to segfault.
# 
#     So if wxPython supports unicode, we give it unicode, otherwise locale
#     dependant text.
#     """
#     try:
#         if isinstance(txt, unicode):
#             return txt
#         elif isinstance(txt, str):
#             return unicode(txt, LOCALE_CHARSET)
#         return str(txt)
#     except UnicodeEncodeError:
#         return '???'
# 
# Path: Wammu/Locales.py
# def ugettext(message):
#     if _TRANSLATION:
#         if six.PY2:
#             return _TRANSLATION.ugettext(message)
#         return _TRANSLATION.gettext(message)
#     return message


import traceback
import Wammu.ErrorLog
import Wammu.ErrorMessage
    from hashlib import md5 as md5
    from md5 import new as md5
from Wammu.Locales import StrConv
from Wammu.Locales import ugettext as _
        traceid = 'N/A'
        tracetext = ''

    # unicode warning
    if errtype == UnicodeEncodeError or errtype == UnicodeDecodeError:
        unicodewarning = '\n%s\n' % (
            _('Unicode encoding error appeared, see question 1 in FAQ, how to solve this.')
        )
    else:
        unicodewarning = ''

    # prepare message
    text = """%s

%s
%s%s%s
%s
------------------ Traceback ID -------------------
%s
-------------------- Traceback --------------------
%s-------------------- Exception --------------------
%s---------------------------------------------------
""" % (
        _('Unhandled exception appeared.'),
        _('If you want to help improving this program, please submit following infomation and description how did it happen to %s. Please report in english, otherwise you will be most likely told to translate you report to english later.') % 'https://github.com/gammu/wammu/issues/',
        logtext,
        tracetext,
        unicodewarning,
        Wammu.ErrorLog.GetSystemInfo(),
        traceid,

# Path: Wammu/Locales.py
# def StrConv(txt):
#     """
#     This function coverts something (txt) to string form usable by wxPython. There
#     is problem that in default configuration in most distros (maybe all) default
#     encoding for unicode objects is ascii. This leads to exception when converting
#     something different than ascii. And this exception is not catched inside
#     wxPython and leads to segfault.
# 
#     So if wxPython supports unicode, we give it unicode, otherwise locale
#     dependant text.
#     """
#     try:
#         if isinstance(txt, unicode):
#             return txt
#         elif isinstance(txt, str):
#             return unicode(txt, LOCALE_CHARSET)
#         return str(txt)
#     except UnicodeEncodeError:
#         return '???'
# 
# Path: Wammu/Locales.py
# def ugettext(message):
#     if _TRANSLATION:
#         if six.PY2:
#             return _TRANSLATION.ugettext(message)
#         return _TRANSLATION.gettext(message)
#     return message


# Path: Wammu/Error.py
import traceback
import Wammu.ErrorLog
import Wammu.ErrorMessage
    from hashlib import md5 as md5
    from md5 import new as md5
from Wammu.Locales import StrConv
from Wammu.Locales import ugettext as _

        traceid = 'N/A'
        tracetext = ''

    # unicode warning
    if errtype == UnicodeEncodeError or errtype == UnicodeDecodeError:
        unicodewarning = '\n%s\n' % (
            _('Unicode encoding error appeared, see question 1 in FAQ, how to solve this.')
        )
    else:
        unicodewarning = ''

    # prepare message
    text = """%s

%s
%s%s%s
%s
------------------ Traceback ID -------------------
%s
-------------------- Traceback --------------------
%s-------------------- Exception --------------------
%s---------------------------------------------------
""" % (
        _('Unhandled exception appeared.'),
        _('If you want to help improving this program, please submit following infomation and description how did it happen to %s. Please report in english, otherwise you will be most likely told to translate you report to english later.') % 'https://github.com/gammu/wammu/issues/',
        logtext,
        tracetext,
        unicodewarning,
        Wammu.ErrorLog.GetSystemInfo(),
        traceid,

        StrConv(texttrace),