svn path=/main/trunk/; revision=3823
import re
-import os, portage, portage_const
+import os, portage, portage_const, portage_exception
class WorldHandler(object):
def name():
errors = []
try:
portage.write_atomic(self.world_file, "\n".join(self.okay))
- except OSError:
+ except portage_exception.PortageException:
errors.append(self.world_file + " could not be opened for writing")
return errors
updating_file = new_protect_filename(updating_file)[0]
try:
write_atomic(updating_file, "".join(file_contents[x]))
- except (OSError, IOError), e:
+ except portage_exception.PortageException, e:
writemsg("\n!!! %s\n" % str(e), noiselevel=-1)
writemsg("!!! An error occured while updating a config file:" + \
" '%s'\n" % updating_file, noiselevel=-1)