misc: only load effective TLDs list once per class (#6875)

This commit is contained in:
Frédéric Péters 2015-04-01 14:05:08 +02:00
parent 725cbb6845
commit 87a7b1cead
1 changed files with 2 additions and 0 deletions

View File

@ -696,6 +696,8 @@ class QommonPublisher(Publisher):
pass
def load_effective_tld_names(cls):
if hasattr(cls, 'etld') and cls.etld:
return
filename = os.path.join(cls.DATA_DIR, 'vendor', 'effective_tld_names.dat')
if not os.path.exists(filename):
cls.etld = None