summaryrefslogtreecommitdiff
path: root/apt/utils.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-10-21 09:13:58 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2011-10-21 09:13:58 +0200
commit8ca5779cfe930f8a423969f7266949ab2826cede (patch)
tree44918730b1f9f5a567ac89f15ab661ae7be1e1a9 /apt/utils.py
parent50756e0efb5081d3379fa874ca41ab57bdf2798d (diff)
parent52097d7edaa97379a4a604be4feb24e5e9c3bd73 (diff)
downloadpython-apt-8ca5779cfe930f8a423969f7266949ab2826cede.tar.gz
merged from the debian-sid branch
Diffstat (limited to 'apt/utils.py')
-rw-r--r--apt/utils.py6
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