Decorator: return an empty list in the absence of sqlite.
(f, self, *a, **kw)
| 51 | |
| 52 | @decorator |
| 53 | def needs_sqlite(f, self, *a, **kw): |
| 54 | """Decorator: return an empty list in the absence of sqlite.""" |
| 55 | if sqlite3 is None or not self.enabled: |
| 56 | return [] |
| 57 | else: |
| 58 | return f(self, *a, **kw) |
| 59 | |
| 60 | |
| 61 | if sqlite3 is not None: |