Skip to content
Browse files

Raising exception when getting shared state of uninitialized LocaleBorg.

  • Loading branch information
felixfontein committed Sep 11, 2015
1 parent 53e4f21 commit b22ea790fc395f7f5c7c1d4cb7e8113052766ba9
Showing with 2 additions and 0 deletions.
  1. +2 −0 nikola/
@@ -1056,6 +1056,8 @@ def initialize(cls, locales, initial_lang):
cls.initialized = True

def __get_shared_state(self):
if not self.initialized:
raise LocaleBorgUninitializedException()
shared_state = getattr(self.__thread_local, 'shared_state', None)
if shared_state is None:
shared_state = {'current_lang': self.__initial_lang}

0 comments on commit b22ea79

Please sign in to comment.
You can’t perform that action at this time.