--autounmask-write: only prompt when necessary
[portage.git] / pym / _emerge / depgraph.py
index 9e97415be47c01fea4776308e88cdaa9230bca09..3daaf441c2c152d6b23ca846e5a5d0b19cbb0cdd 100644 (file)
@@ -5776,7 +5776,7 @@ class depgraph(object):
                                except PortageException:
                                        problems.append("!!! Failed to write '%s'\n" % file_to_write_to)
 
-               if write_to_file and ask:
+               if ask and write_to_file and file_to_write_to:
                        prompt = "\nWould you like to add these " + \
                                "changes to your config files?"
                        if userquery(prompt, enter_invalid) == 'No':