1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-02 12:59:02 +00:00

Remove unused imports

This commit is contained in:
dmiller
2019-12-28 02:42:14 +00:00
parent 6d624f9ed7
commit 92bf83aaba
38 changed files with 20 additions and 104 deletions

View File

@@ -127,7 +127,6 @@
# ***************************************************************************/
import gtk
import os.path
import webbrowser
from zenmapGUI.higwidgets.higdialogs import HIGDialog
@@ -142,7 +141,6 @@ from zenmapGUI.higwidgets.higtextviewers import HIGTextView
from zenmapCore.Name import APP_DISPLAY_NAME, APP_WEB_SITE, APP_COPYRIGHT, \
NMAP_DISPLAY_NAME, NMAP_WEB_SITE, UMIT_DISPLAY_NAME, UMIT_WEB_SITE
from zenmapCore.Version import VERSION
from zenmapCore.Paths import Path
import zenmapCore.I18N

View File

@@ -159,15 +159,12 @@ warnings.resetwarnings()
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog
import zenmapCore.UmitConf
import zenmapCore.Paths
from zenmapCore.UmitConf import is_maemo
from zenmapCore.UmitConf import is_maemo, config_parser, SearchConfig
from zenmapCore.UmitLogging import log
from zenmapCore.UmitOptionParser import option_parser
from zenmapCore.Name import APP_NAME, APP_DISPLAY_NAME, NMAP_DISPLAY_NAME
from zenmapCore.UmitConf import SearchConfig
import zenmapCore.I18N
from zenmapCore.Paths import Path
from zenmapCore.Paths import Path, create_user_config_dir
from zenmapCore.Name import APP_DISPLAY_NAME
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog
@@ -229,7 +226,6 @@ def install_excepthook():
# Cause an exception if PyGTK can't open a display. Normally this just
# produces a warning, but the lack of a display eventually causes a
# segmentation fault. See http://live.gnome.org/PyGTK/WhatsNew210.
import warnings
warnings.filterwarnings("error", module="gtk")
import gtk
warnings.resetwarnings()
@@ -284,7 +280,7 @@ def run():
try:
# Create the ~/.zenmap directory by copying from the system-wide
# template directory.
zenmapCore.Paths.create_user_config_dir(
create_user_config_dir(
Path.user_config_dir, Path.config_dir)
except (IOError, OSError), e:
error_dialog = HIGAlertDialog(
@@ -309,11 +305,11 @@ scan profiles. Check for access to the directory and try again.""") % (
try:
# Read the ~/.zenmap/zenmap.conf configuration file.
zenmapCore.UmitConf.config_parser.read(Path.user_config_file)
config_parser.read(Path.user_config_file)
except ConfigParser.ParsingError, e:
# ParsingError can leave some values as lists instead of strings. Just
# blow it all away if we have this problem.
zenmapCore.UmitConf.config_parser = zenmapCore.UmitConf.config_parser.__class__()
config_parser = config_parser.__class__()
error_dialog = HIGAlertDialog(
message_format=_("Error parsing the configuration file"),
secondary_text=_("""\

View File

@@ -128,7 +128,6 @@
import gobject
import gtk
import pango
import os
import os.path
import sys
@@ -139,7 +138,7 @@ xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x]
import xml.sax
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog, HIGDialog
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog
from zenmapGUI.higwidgets.higboxes import HIGVBox, HIGHBox, \
hig_box_space_holder
from zenmapGUI.higwidgets.higlabels import HIGSectionLabel

View File

@@ -129,11 +129,9 @@
import gtk
import gobject
import re
import sys
import os.path
from zenmapCore.Paths import Path
from zenmapCore.UmitConf import is_maemo
from zenmapCore.UmitLogging import log
icon_names = (

View File

@@ -130,8 +130,7 @@ import gtk
import sys
import os
from os.path import split, isfile, join, abspath, exists
import errno
from os.path import split, isfile, join, abspath
# Prevent loading PyXML
import xml
@@ -139,13 +138,10 @@ xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x]
import xml.sax.saxutils
from time import time
from zenmapGUI.higwidgets.higwindows import HIGMainWindow
from zenmapGUI.higwidgets.higdialogs import HIGDialog, HIGAlertDialog
from zenmapGUI.higwidgets.higlabels import HIGEntryLabel
from zenmapGUI.higwidgets.higboxes import HIGHBox, HIGVBox
from zenmapGUI.higwidgets.higlabels import HIGSectionLabel
import zenmapGUI.App
from zenmapGUI.FileChoosers import *
@@ -164,7 +160,6 @@ from zenmapCore.UmitLogging import log
import zenmapCore.I18N
import zenmapGUI.Print
from zenmapCore.UmitConf import SearchConfig, is_maemo, WindowConfig, config_parser
from zenmapCore.NetworkInventory import FilteredNetworkInventory
UmitScanWindow = None
hildon = None

View File

@@ -126,8 +126,6 @@
# * *
# ***************************************************************************/
import locale
import sys
import gobject
import gtk
import gtk.gdk

View File

@@ -136,17 +136,14 @@ xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x]
from xml.dom import minidom
from zenmapGUI.higwidgets.higboxes import HIGHBox
from zenmapGUI.higwidgets.higlabels import HIGEntryLabel
from zenmapGUI.higwidgets.higbuttons import HIGButton
from zenmapGUI.FileChoosers import AllFilesFileChooserDialog
from zenmapGUI.ProfileHelp import ProfileHelp
from zenmapCore.Paths import Path
from zenmapCore.NmapOptions import NmapOptions, split_quoted, join_quoted
import zenmapCore.I18N
from zenmapCore.UmitLogging import log
from zenmapGUI.ScriptInterface import *

View File

@@ -139,7 +139,7 @@ from zenmapGUI.higwidgets.higtables import HIGTable
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog, HIGDialog
from zenmapGUI.OptionBuilder import *
from zenmapCore.Paths import Path
from zenmapCore.UmitConf import Profile, CommandProfile
from zenmapCore.UmitConf import CommandProfile
from zenmapCore.UmitLogging import log
import zenmapCore.I18N
from zenmapCore.NmapOptions import NmapOptions

View File

@@ -128,7 +128,6 @@
import gtk
from types import StringTypes
from zenmapGUI.higwidgets.higboxes import HIGVBox
from zenmapGUI.Icons import get_os_icon
import zenmapCore.I18N

View File

@@ -139,18 +139,16 @@ xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x]
import xml.sax
from zenmapGUI.higwidgets.hignotebooks import HIGNotebook, HIGAnimatedTabLabel
from zenmapGUI.higwidgets.higboxes import HIGVBox, HIGHBox
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog, HIGDialog
from zenmapGUI.higwidgets.hignotebooks import HIGNotebook
from zenmapGUI.higwidgets.higboxes import HIGVBox
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog
from zenmapGUI.higwidgets.higscrollers import HIGScrolledWindow
from zenmapGUI.higwidgets.higlabels import HIGSectionLabel
from zenmapGUI.FilterBar import FilterBar
from zenmapGUI.ScanHostDetailsPage import ScanHostDetailsPage
from zenmapGUI.ScanToolbar import ScanCommandToolbar, ScanToolbar
from zenmapGUI.ScanHostsView import ScanHostsView
from zenmapGUI.ScanOpenPortsPage import ScanOpenPortsPage
from zenmapGUI.ScanRunDetailsPage import ScanRunDetailsPage
from zenmapGUI.ScanNmapOutputPage import ScanNmapOutputPage
from zenmapGUI.ScanScanListPage import ScanScanListPage
from zenmapGUI.ScansListStore import ScansListStore
@@ -159,7 +157,7 @@ from zenmapGUI.TopologyPage import TopologyPage
from zenmapCore.NetworkInventory import NetworkInventory,\
FilteredNetworkInventory
from zenmapCore.NmapCommand import NmapCommand
from zenmapCore.UmitConf import CommandProfile, ProfileNotFound, is_maemo
from zenmapCore.UmitConf import CommandProfile, is_maemo
from zenmapCore.NmapParser import NmapParser
from zenmapCore.Paths import Path, get_extra_executable_search_paths
from zenmapCore.UmitLogging import log

View File

@@ -135,7 +135,6 @@ from zenmapGUI.higwidgets.higboxes import HIGHBox, HIGVBox
from zenmapGUI.NmapOutputViewer import NmapOutputViewer
from zenmapGUI.ScanRunDetailsPage import ScanRunDetailsPage
from zenmapGUI.ScansListStore import ScansListStore
from zenmapCore.Paths import Path
from zenmapCore.UmitLogging import log
import zenmapCore.I18N

View File

@@ -128,8 +128,7 @@
import gtk
from zenmapGUI.higwidgets.higboxes import HIGVBox, HIGHBox
from zenmapGUI.higwidgets.higtables import HIGTable
from zenmapGUI.higwidgets.higboxes import HIGVBox
from zenmapCore.UmitLogging import log
import zenmapCore.I18N

View File

@@ -129,7 +129,6 @@
import gtk
from zenmapGUI.higwidgets.higboxes import HIGHBox
from zenmapGUI.higwidgets.higbuttons import HIGButton
from zenmapGUI.higwidgets.higlabels import HIGEntryLabel
import zenmapCore.I18N

View File

@@ -138,20 +138,13 @@ xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x]
import xml.sax
from zenmapGUI.higwidgets.higwindows import HIGWindow
from zenmapGUI.higwidgets.higboxes import HIGVBox, HIGHBox, HIGSpacer,\
hig_box_space_holder
from zenmapGUI.higwidgets.higlabels import HIGSectionLabel, HIGEntryLabel
from zenmapGUI.higwidgets.higboxes import HIGVBox, HIGHBox, hig_box_space_holder
from zenmapGUI.higwidgets.higscrollers import HIGScrolledWindow
from zenmapGUI.higwidgets.higtextviewers import HIGTextView
from zenmapGUI.higwidgets.higbuttons import HIGButton
from zenmapGUI.higwidgets.higtables import HIGTable
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog, HIGDialog
from zenmapCore.ScriptMetadata import *
from zenmapCore.ScriptArgsParser import parse_script_args_dict
from zenmapCore.NmapCommand import NmapCommand
from zenmapCore.NmapOptions import NmapOptions
from zenmapCore.Paths import Path
import zenmapCore.NSEDocParser
import zenmapGUI.FileChoosers
from zenmapCore.UmitConf import PathsConfig

View File

@@ -127,29 +127,20 @@
# ***************************************************************************/
import gtk
import os.path
import re
import copy
from zenmapGUI.higwidgets.higwindows import HIGWindow
from zenmapGUI.higwidgets.higboxes import HIGVBox
from zenmapGUI.higwidgets.higbuttons import HIGButton, HIGToggleButton
from zenmapGUI.higwidgets.higboxes import HIGVBox, HIGHBox, HIGSpacer,\
hig_box_space_holder
from zenmapGUI.higwidgets.higlabels import HIGSectionLabel, HIGEntryLabel,\
HintWindow
from zenmapGUI.higwidgets.higtables import HIGTable
from zenmapGUI.higwidgets.higboxes import HIGHBox
from zenmapGUI.higwidgets.higlabels import HIGSectionLabel, HintWindow
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog
from types import StringTypes
import datetime
from zenmapCore.Name import APP_DISPLAY_NAME
import zenmapCore.I18N
from zenmapCore.UmitLogging import log
from zenmapCore.NmapOptions import split_quoted
from zenmapCore.SearchResult import SearchDir, SearchDB, SearchDummy
from zenmapCore.UmitConf import is_maemo
from zenmapCore.UmitConf import SearchConfig
from zenmapGUI.FileChoosers import DirectoryChooserDialog

View File

@@ -129,17 +129,9 @@
import gtk
from zenmapGUI.ScanToolbar import *
from zenmapCore.NetworkInventory import NetworkInventory
from zenmapCore.UmitConf import CommandProfile, ProfileNotFound
from zenmapCore.NmapCommand import NmapCommand
from zenmapCore.NmapParser import NmapParser
from zenmapGUI.higwidgets.higboxes import HIGVBox, HIGHBox
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog
from zenmapGUI.higwidgets.higbuttons import HIGButton, HIGToggleButton
from zenmapGUI.higwidgets.higwindows import HIGWindow
from zenmapGUI.higwidgets.higboxes import HIGVBox
from radialnet.core.XMLHandler import XMLReader
from radialnet.gui.RadialNet import *
from radialnet.gui.ControlWidget import *
from radialnet.gui.Toolbar import Toolbar

View File

@@ -129,7 +129,6 @@
import gtk
import gobject
from higspinner import HIGSpinner
from higboxes import HIGHBox
from higbuttons import HIGButton

View File

@@ -134,7 +134,6 @@ higwidgets/higspinner.py
__all__ = ['HIGSpinner']
import os
import gtk
import gobject