Commit 3ab5f2c0266ba0594bcdf5c3d5a7f97d61d079ec
1 parent
2ed7a6ef
Exists in
master
and in
1 other branch
Added exception catching for old version of xapian.
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
src/data.py
| ... | ... | @@ -206,7 +206,10 @@ class PopconXapianIndex(xapian.WritableDatabase): |
| 206 | 206 | # python garbage collector |
| 207 | 207 | gc.collect() |
| 208 | 208 | # flush to disk database changes |
| 209 | - self.commit() | |
| 209 | + try: | |
| 210 | + self.commit() | |
| 211 | + except: | |
| 212 | + self.flush() # deprecated function, used for old lib version | |
| 210 | 213 | |
| 211 | 214 | def get_submissions(self,submissions_dir): |
| 212 | 215 | """ | ... | ... |