From 8ec75b761e2ca78b782e6364d83f421a16cbb9a8 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 27 Sep 2007 22:03:49 +0000 Subject: [PATCH] Avoid useless and ugly atexit tracebacks that are triggered when portage exits during the portdbapi constructor. (trunk r6620) svn path=/main/branches/2.1.2/; revision=7863 --- pym/portage.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pym/portage.py b/pym/portage.py index 14d3e60d0..c3c640182 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -6113,6 +6113,9 @@ class portdbapi(dbapi): pass def close_caches(self): + if not hasattr(self, "auxdb"): + # unhandled exception thrown from constructor + return for x in self.auxdb: self.auxdb[x].sync() self.auxdb.clear() -- 2.26.2