projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35f7859
)
Make dblink.delete() remove empty parent category directories.
author
Zac Medico
<zmedico@gentoo.org>
Sat, 31 Oct 2009 19:08:45 +0000
(19:08 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Sat, 31 Oct 2009 19:08:45 +0000
(19:08 -0000)
svn path=/main/trunk/; revision=14754
pym/portage/dbapi/vartree.py
patch
|
blob
|
history
diff --git
a/pym/portage/dbapi/vartree.py
b/pym/portage/dbapi/vartree.py
index db91be3d5fcba2ceec10b5b1f782df152fb8731c..137e22f269325eaf451795481c9c5aa7fd01fd68 100644
(file)
--- a/
pym/portage/dbapi/vartree.py
+++ b/
pym/portage/dbapi/vartree.py
@@
-1947,6
+1947,11
@@
class dblink(object):
return
shutil.rmtree(self.dbdir)
+ # If empty, remove parent category directory.
+ try:
+ os.rmdir(os.path.dirname(self.dbdir))
+ except OSError:
+ pass
self.vartree.dbapi._remove(self)
def clearcontents(self):