149 if not os.path.exists(d): |
149 if not os.path.exists(d): |
150 os.makedirs(d) |
150 os.makedirs(d) |
151 |
151 |
152 try: |
152 try: |
153 d = enchant.DictWithPWL(lang, pwl, pel) |
153 d = enchant.DictWithPWL(lang, pwl, pel) |
154 except: |
154 except Exception: |
155 # Catch all exceptions, because if pyenchant isn't available, you |
155 # Catch all exceptions, because if pyenchant isn't available, you |
156 # can't catch the enchant.DictNotFound error. |
156 # can't catch the enchant.DictNotFound error. |
157 d = None |
157 d = None |
158 return d |
158 return d |
159 |
159 |