Browse Source

app.conf.humanize(): Discard dict methods from list of config keys.

Ask Solem 8 years ago
parent
commit
0a8b7c60e1
1 changed files with 2 additions and 0 deletions
  1. 2 0
      celery/app/utils.py

+ 2 - 0
celery/app/utils.py

@@ -165,10 +165,12 @@ class Settings(ConfigurationView):
 
     def table(self, with_defaults=False, censored=True):
         filt = filter_hidden_settings if censored else lambda v: v
+        dict_members = dir(dict)
         return filt({
             k: v for k, v in items(
                 self if with_defaults else self.without_defaults())
             if not k.startswith('_')
+            and k not in dict_members
         })
 
     def humanize(self, with_defaults=False, censored=True):