dsm...@localhost  committed e74e197

Tidied up a couple of little bugs.

  • Participants
  • Parent commits 0280866

Comments (0)

Files changed (1)

File helptext/

 from itertools import groupby
+import os
 from django.conf import settings
 from django.contrib.contenttypes.models import ContentType
         path = getattr(settings, 'HELPTEXT_CONFIGURATION', '')
         # if we error out in trying to get the config, we
         # use this value as a sentinel
-        _configuration = False
+        _configuration = {}
         if path:
             # we'll be lenient for a non-existent path, but if the
             # path exists and isn't any good, we'll blow up.
             if not os.path.exists(path):
                 import warnings
                 warnings.warn("helptext configuration not found at %s" % path,
-                              warnings.RuntimeWarning)
+                              RuntimeWarning)
                 # let IOError or ValueError propagate
                 _tmp = load(open(path))
     def get_configured_help_text(self):
         helptext_configuration = get_configuration()
-        if _configuration:
+        if helptext_configuration:
             return helptext_configuration.get(self.lookup_key(), "")
         return ""