Return an epoch or None for the epoch 0 and if no epoch is defined.
(self)
| 507 | |
| 508 | @property |
| 509 | def epoch(self): |
| 510 | """ |
| 511 | Return an epoch or None for the epoch 0 and if no epoch is defined. |
| 512 | """ |
| 513 | epoch = self.get_entry_value(RPMTAG_EPOCH) |
| 514 | if not epoch: |
| 515 | return |
| 516 | if isinstance(epoch, (tuple, list)): |
| 517 | epoch = epoch[0] |
| 518 | if not isinstance(epoch, str): |
| 519 | epoch = str(epoch) |
| 520 | if not epoch or epoch == '0': |
| 521 | return |
| 522 | if epoch.lower() == 'none': |
| 523 | return |
| 524 | return epoch |
| 525 | |
| 526 | @property |
| 527 | def version(self): |
nothing calls this directly
no test coverage detected