mirror of
https://github.com/nmap/nmap.git
synced 2025-12-08 13:41:29 +00:00
Fix a crash, config_parser referenced before assignment.
This commit is contained in:
@@ -159,7 +159,8 @@ warnings.resetwarnings()
|
|||||||
|
|
||||||
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog
|
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog
|
||||||
|
|
||||||
from zenmapCore.UmitConf import is_maemo, config_parser, SearchConfig
|
from zenmapCore.UmitConf import is_maemo, SearchConfig
|
||||||
|
import zenmapCore.UmitConf
|
||||||
from zenmapCore.UmitLogging import log
|
from zenmapCore.UmitLogging import log
|
||||||
from zenmapCore.UmitOptionParser import option_parser
|
from zenmapCore.UmitOptionParser import option_parser
|
||||||
from zenmapCore.Name import APP_NAME, APP_DISPLAY_NAME, NMAP_DISPLAY_NAME
|
from zenmapCore.Name import APP_NAME, APP_DISPLAY_NAME, NMAP_DISPLAY_NAME
|
||||||
@@ -305,11 +306,11 @@ scan profiles. Check for access to the directory and try again.""") % (
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
# Read the ~/.zenmap/zenmap.conf configuration file.
|
# Read the ~/.zenmap/zenmap.conf configuration file.
|
||||||
config_parser.read(Path.user_config_file)
|
zenmapCore.UmitConf.config_parser.read(Path.user_config_file)
|
||||||
except ConfigParser.ParsingError, e:
|
except ConfigParser.ParsingError, e:
|
||||||
# ParsingError can leave some values as lists instead of strings. Just
|
# ParsingError can leave some values as lists instead of strings. Just
|
||||||
# blow it all away if we have this problem.
|
# blow it all away if we have this problem.
|
||||||
config_parser = config_parser.__class__()
|
zenmapCore.UmitConf.config_parser = zenmapCore.UmitConf.config_parser.__class__()
|
||||||
error_dialog = HIGAlertDialog(
|
error_dialog = HIGAlertDialog(
|
||||||
message_format=_("Error parsing the configuration file"),
|
message_format=_("Error parsing the configuration file"),
|
||||||
secondary_text=_("""\
|
secondary_text=_("""\
|
||||||
|
|||||||
Reference in New Issue
Block a user