Show More
@@ -221,7 +221,6 b' class HistoryAccessor(Configurable):' | |||
|
221 | 221 | ## ------------------------------- |
|
222 | 222 | ## Methods for retrieving history: |
|
223 | 223 | ## ------------------------------- |
|
224 | @catch_corrupt_db | |
|
225 | 224 | def _run_sql(self, sql, params, raw=True, output=False): |
|
226 | 225 | """Prepares and runs an SQL query for the history database. |
|
227 | 226 | |
@@ -278,6 +277,7 b' class HistoryAccessor(Configurable):' | |||
|
278 | 277 | query = "SELECT * from sessions where session == ?" |
|
279 | 278 | return self.db.execute(query, (session,)).fetchone() |
|
280 | 279 | |
|
280 | @catch_corrupt_db | |
|
281 | 281 | def get_tail(self, n=10, raw=True, output=False, include_latest=False): |
|
282 | 282 | """Get the last n lines from the history database. |
|
283 | 283 | |
@@ -305,6 +305,7 b' class HistoryAccessor(Configurable):' | |||
|
305 | 305 | return reversed(list(cur)[1:]) |
|
306 | 306 | return reversed(list(cur)) |
|
307 | 307 | |
|
308 | @catch_corrupt_db | |
|
308 | 309 | def search(self, pattern="*", raw=True, search_raw=True, |
|
309 | 310 | output=False, n=None): |
|
310 | 311 | """Search the database using unix glob-style matching (wildcards |
@@ -339,7 +340,8 b' class HistoryAccessor(Configurable):' | |||
|
339 | 340 | if n is not None: |
|
340 | 341 | return reversed(list(cur)) |
|
341 | 342 | return cur |
|
342 | ||
|
343 | ||
|
344 | @catch_corrupt_db | |
|
343 | 345 | def get_range(self, session, start=1, stop=None, raw=True,output=False): |
|
344 | 346 | """Retrieve input by session. |
|
345 | 347 |
General Comments 0
You need to be logged in to leave comments.
Login now