From: Zac Medico Date: Thu, 27 Sep 2007 22:03:49 +0000 (-0000) Subject: Avoid useless and ugly atexit tracebacks that are triggered when X-Git-Tag: v2.1.3.16~98 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8ec75b761e2ca78b782e6364d83f421a16cbb9a8;p=portage.git 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 --- 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()