0001-misc-display-last-update-time-in-a-human-format-4244.patch
bijoe/engine.py | ||
---|---|---|
16 | 16 | |
17 | 17 |
import collections |
18 | 18 |
import contextlib |
19 |
import datetime |
|
19 | 20 |
import logging |
20 | 21 |
import itertools |
21 | 22 |
import hashlib |
... | ... | |
525 | 526 |
def __getattr__(self, name): |
526 | 527 |
return getattr(self.warehouse, name) |
527 | 528 | |
529 |
def timestamp(self): |
|
530 |
return datetime.datetime.fromtimestamp(self.warehouse.timestamp) if self.warehouse.timestamp else None |
|
531 | ||
528 | 532 |
@contextlib.contextmanager |
529 | 533 |
def get_cursor(self): |
530 | 534 |
with contextlib.closing(psycopg2.connect(self.warehouse.pg_dsn)) as connection: |
531 |
- |