diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-10-19 18:07:20 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-10-19 18:07:20 +0200 |
| commit | 46885bf24dc2cf9b3986abcf40c040e20566402a (patch) | |
| tree | 1471609c09a6c27624651d179a97e39939f0c747 /apt | |
| parent | 3c35eb3da332cf30781dba78ed777b26934136ac (diff) | |
| parent | b0995cca556668a4eced03e40e3edbc7362c2a10 (diff) | |
| download | python-apt-46885bf24dc2cf9b3986abcf40c040e20566402a.tar.gz | |
* merged from ubuntu:
- use logging instead of print
- update distro template Ubuntu.info.in
- add xz compression support
Diffstat (limited to 'apt')
| -rw-r--r-- | apt/utils.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apt/utils.py b/apt/utils.py index 4b3da39f..49e8bed5 100644 --- a/apt/utils.py +++ b/apt/utils.py @@ -28,11 +28,13 @@ def get_maintenance_end_date(release_date, m_months): ends. Needs the data of the release and the number of months that its is supported as input """ - years = m_months / 12 + # calc end date + years = m_months // 12 months = m_months % 12 support_end_year = (release_date.year + years + - (release_date.month + months)/12) + (release_date.month + months)//12) support_end_month = (release_date.month + months) % 12 + # special case: this happens when e.g. doing 2010-06 + 18 months if support_end_month == 0: support_end_month = 12 support_end_year -= 1 |
