From 2c109703e505ac3d17e261f6fd16bb49f9dcb23c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 24 May 2008 22:24:58 +0000 Subject: [PATCH] Fix broken dep_getusedeps() cache behavior so that it returns the correct type. svn path=/main/trunk/; revision=10395 --- pym/portage/dep.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pym/portage/dep.py b/pym/portage/dep.py index fa87a7719..3e642b517 100644 --- a/pym/portage/dep.py +++ b/pym/portage/dep.py @@ -345,6 +345,7 @@ class _use_dep(object): disabled_flags.append(x[1:]) else: enabled_flags.append(x) + self.tokens = use self.enabled = frozenset(enabled_flags) self.disabled = frozenset(disabled_flags) self.required = self.enabled.union(self.disabled) @@ -499,8 +500,8 @@ def dep_getusedeps( depend ): @return: List of use flags ( or [] if no flags exist ) """ use = getattr(depend, "use", None) - if use is not None: - return use + if use is not None and hasattr(use, "tokens"): + return use.tokens use_list = [] open_bracket = depend.find('[') # -1 = failure (think c++ string::npos) -- 2.26.2