From 1516d6e4aa10da1b98d8ea899358632ca55f3efc Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 25 Jun 2006 09:54:19 +0000 Subject: Print a message to stderr if an error occurs when updating a config file. svn path=/main/trunk/; revision=3654 --- pym/portage.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pym') diff --git a/pym/portage.py b/pym/portage.py index d78d72f2b..710b098eb 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -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): -- cgit v1.2.3-1-g7c22