Edgewall Software

Ticket #7253: safe.translations.attr.disable.patch

File safe.translations.attr.disable.patch, 0.5 KB (added by Pedro Algarvio, aka, s0undt3ch <ufs@…>, 8 months ago)
  • trac/util/translation.py

     
    111111        return getattr(_current, 'translations', _null_translations) 
    112112 
    113113    def deactivate(): 
    114         del _current.translations 
     114        if hasattr(_current, 'translations'): 
     115            del _current.translations 
    115116 
    116117    def get_available_locales(): 
    117118        """Return a list of locale identifiers of the locales for which