Commit e9865600fd5650fa0aac68813ff7fefbf42a60e8
- Diff rendering mode:
- inline
- side by side
entry.py
(14 / 0)
|   | |||
| 364 | 364 | Entry.parse(self) | |
| 365 | 365 | self.tags += ['code'] #TODO: should I hardcode this? | |
| 366 | 366 | ||
| 367 | """No unique links, so we need a stronger criteria.""" | ||
| 368 | def db_get_entry_id(self, cursor): | ||
| 369 | cursor.execute("""SELECT id FROM entries | ||
| 370 | WHERE link=%s AND rec_updated=%s""", | ||
| 371 | (self.link, self.updated_ts)) | ||
| 372 | if cursor.rowcount == 0: | ||
| 373 | return None | ||
| 374 | elif cursor.rowcount == 1: | ||
| 375 | return cursor._rows[0][0] | ||
| 376 | else: | ||
| 377 | #TODO: need to output warning and move on, not raise exception | ||
| 378 | print cursor._rows | ||
| 379 | raise Exception("Cannot determine unqiue entry_id %d" % cursor.rowcount) | ||
| 380 | |||
| 367 | 381 | class GoogleReaderSharedItem(SharedItem): | |
| 368 | 382 | """Don't want tags because I didn't create them.""" | |
| 369 | 383 | def get_tags(self): |

