Here are some various clean-ups to portage_file.py. It eliminates 7 errors and 5 warnings (as reported by pylint). More specifically, I don't think the makedirs() function is used anywhere (though I have not checked) as it contained so many errors that it could not be used. It may be a candidate for removal from this module. Patch follows.
Created attachment 86920 [details, diff] Said patch
the systemExit except can get nuked, but I'll tag this for 2.1.1/2.2 due to the code freeze on 2.1.0
I've removed the whole module in svn r3892.
This has been released in 2.1.1_pre3-r1.