Print a message to stderr if an error occurs when updating a config file.
authorZac Medico <zmedico@gentoo.org>
Sun, 25 Jun 2006 09:54:19 +0000 (09:54 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 25 Jun 2006 09:54:19 +0000 (09:54 -0000)
svn path=/main/trunk/; revision=3654

pym/portage.py

index d78d72f2bf7c7b01196244f617a4568a8d3dcb4f..710b098eb98977ab122af61714a50a2fd7726572 100644 (file)
@@ -6919,7 +6919,10 @@ def update_config_files(config_root, protect, protect_mask, update_iter):
                        updating_file = new_protect_filename(updating_file)[0]
                try:
                        write_atomic(updating_file, "".join(file_contents[x]))
-               except IOError:
+               except (OSError, IOError), e:
+                       writemsg("\n!!! %s\n" % str(e), noiselevel=-1)
+                       writemsg("!!! An error occured while updating a config file:" + \
+                               " '%s'\n" % updating_file, noiselevel=-1)
                        continue
 
 def global_updates(mysettings, trees, prev_mtimes):