summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 91121bbc8..057c3e11d 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -4719,6 +4719,10 @@ class vardbapi(dbapi):
def cpv_counter(self,mycpv):
"This method will grab the COUNTER. Returns a counter value."
+ try:
+ return long(self.aux_get(mycpv, ["COUNTER"])[0])
+ except KeyError, ValueError:
+ pass
cdir=self.root+VDB_PATH+"/"+mycpv
cpath=self.root+VDB_PATH+"/"+mycpv+"/COUNTER"