1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Fix file permissions again for zenmap.conf. Handle it in one place only.

This commit is contained in:
dmiller
2016-10-17 16:14:58 +00:00
parent ab44513a98
commit 20de140ae6
3 changed files with 24 additions and 34 deletions

View File

@@ -126,7 +126,6 @@ import gtk
import gtk.gdk
import pango
import re
import errno
import zenmapCore.I18N
from zenmapCore.UmitLogging import log
@@ -264,20 +263,7 @@ class NmapOutputViewer (gtk.VBox):
self.nmap_highlight.__setattr__(widget.property_name, wid_props)
nmap_out_prop.destroy()
try:
self.nmap_highlight.save_changes()
except IOError as e:
if e.errno == errno.EACCES:
alert = HIGAlertDialog(
message_format=_("Can't save Zenmap configuration"),
secondary_text=_(
'Permission denied when writing to \n%s'
'\nMake sure the file exists and is writable.'
) % (Path.user_config_file))
alert.run()
alert.destroy()
else:
raise
self.nmap_highlight.save_changes()
self.apply_highlighting()
def apply_highlighting(self, start_iter=None, end_iter=None):