Skip to content

Commit

Permalink
delete unused function toolboxes._encode_string()
Browse files Browse the repository at this point in the history
  • Loading branch information
pesekon2 authored and petrasovaa committed Dec 6, 2019
1 parent cf6c2e6 commit b99d1d2
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions gui/wxpython/core/toolboxes.py
Expand Up @@ -106,23 +106,6 @@ def _debug(level, message):
gcore.debug(message, level)


def _encode_string(string):
"""Encode a unicode *string* using the system encoding
If it is not possible to use system encoding, UTF-8 is used.
"""
try:
from core.gcmd import EncodeString
return EncodeString(string)
except ImportError:
# This is the case when we have errors during compilation but
# the environment is not complete (compilation, custom setups
# of GRASS environmet) and we cannot import wx correctly.
# UTF-8 is pretty good guess for most cases (and should work for
# Mac OS X where wx 32 vs 64 bit issue is happaning).
return string.encode('utf-8')


def toolboxesOutdated():
"""Removes auto-generated menudata.xml
to let gui regenerate it next time it starts."""
Expand Down

0 comments on commit b99d1d2

Please sign in to comment.