From 2401e90bceccf413a6d163023d2f86f99ec28215 Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Sun, 4 Sep 2011 17:05:35 +0000 Subject: [PATCH] hints: fix up hint parsing code for age-days string.split()'s second argument specifies the maximum number of times the string should be split, not the maximum number of elements in the result. Signed-off-by: Adam D. Barratt --- hints.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hints.py b/hints.py index bc2b87e..2629ef6 100644 --- a/hints.py +++ b/hints.py @@ -44,14 +44,14 @@ class Hint: self._type = hint[0] self._packages = hint[1:] else: - self._type, self._packages = hint.split(' ', 2) + self._type, self._packages = hint.split(' ', 1) if self._type == 'age-days': if isinstance(hint, list): self._days = self._packages[0] self._packages = self._packages[1:] else: - self._days, self._packages = self._packages.split(' ', 2) + self._days, self._packages = self._packages.split(' ', 1) self._packages = [HintItem(x) for x in self._packages]