mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
Delete unused variables and unreachable statements. #1834
This commit is contained in:
@@ -222,7 +222,6 @@ class LegendWindow(gtk.Window):
|
|||||||
"""
|
"""
|
||||||
"""
|
"""
|
||||||
self.graphic_context = widget.window.cairo_create()
|
self.graphic_context = widget.window.cairo_create()
|
||||||
w, h = widget.window.get_size()
|
|
||||||
x, y = 45, 20
|
x, y = 45, 20
|
||||||
draw_heading(self.graphic_context, x, y, _("Hosts"))
|
draw_heading(self.graphic_context, x, y, _("Hosts"))
|
||||||
|
|
||||||
|
|||||||
@@ -835,7 +835,6 @@ class RadialNet(gtk.DrawingArea):
|
|||||||
@rtype: boolean
|
@rtype: boolean
|
||||||
@return: Indicator of the event propagation
|
@return: Indicator of the event propagation
|
||||||
"""
|
"""
|
||||||
xc, yc = self.__center_of_widget
|
|
||||||
pointer = self.get_pointer()
|
pointer = self.get_pointer()
|
||||||
|
|
||||||
for node in self.__graph.get_nodes():
|
for node in self.__graph.get_nodes():
|
||||||
@@ -871,8 +870,6 @@ class RadialNet(gtk.DrawingArea):
|
|||||||
@rtype: boolean
|
@rtype: boolean
|
||||||
@return: Indicator of the event propagation
|
@return: Indicator of the event propagation
|
||||||
"""
|
"""
|
||||||
allocation = self.get_allocation()
|
|
||||||
|
|
||||||
context = widget.window.cairo_create()
|
context = widget.window.cairo_create()
|
||||||
|
|
||||||
context.rectangle(*event.area)
|
context.rectangle(*event.area)
|
||||||
@@ -894,7 +891,6 @@ class RadialNet(gtk.DrawingArea):
|
|||||||
self.__center_of_widget = (allocation.width / 2,
|
self.__center_of_widget = (allocation.width / 2,
|
||||||
allocation.height / 2)
|
allocation.height / 2)
|
||||||
|
|
||||||
aw, ah = allocation.width, allocation.height
|
|
||||||
xc, yc = self.__center_of_widget
|
xc, yc = self.__center_of_widget
|
||||||
|
|
||||||
ax, ay = self.__translation
|
ax, ay = self.__translation
|
||||||
@@ -926,7 +922,6 @@ class RadialNet(gtk.DrawingArea):
|
|||||||
|
|
||||||
if node.get_draw_info('region') is not None and not_grouped:
|
if node.get_draw_info('region') is not None and not_grouped:
|
||||||
|
|
||||||
x, y = node.get_cartesian_coordinate()
|
|
||||||
xc, yc = self.__center_of_widget
|
xc, yc = self.__center_of_widget
|
||||||
r, g, b = REGION_COLORS[node.get_draw_info('region')]
|
r, g, b = REGION_COLORS[node.get_draw_info('region')]
|
||||||
|
|
||||||
@@ -1908,7 +1903,6 @@ class NetNode(Node):
|
|||||||
for port in host.ports:
|
for port in host.ports:
|
||||||
if port["port_state"] == "filtered":
|
if port["port_state"] == "filtered":
|
||||||
return True
|
return True
|
||||||
break
|
|
||||||
return False
|
return False
|
||||||
elif info == "ports":
|
elif info == "ports":
|
||||||
ports = list()
|
ports = list()
|
||||||
|
|||||||
@@ -161,7 +161,6 @@ def nsedoc_parse(text):
|
|||||||
"list_item_end", "text", or "code". The types "text" and "code" have a text
|
"list_item_end", "text", or "code". The types "text" and "code" have a text
|
||||||
member with the text that they contain."""
|
member with the text that they contain."""
|
||||||
i = 0
|
i = 0
|
||||||
j = 0
|
|
||||||
in_list = False
|
in_list = False
|
||||||
|
|
||||||
while i < len(text):
|
while i < len(text):
|
||||||
|
|||||||
@@ -353,7 +353,6 @@ class NmapOutputViewer (gtk.VBox):
|
|||||||
|
|
||||||
# Seek to the end of the most recent read.
|
# Seek to the end of the most recent read.
|
||||||
self.command_execution.stdout_file.seek(self.output_file_pointer)
|
self.command_execution.stdout_file.seek(self.output_file_pointer)
|
||||||
pos = self.command_execution.stdout_file.tell()
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
new_output = self.command_execution.stdout_file.read()
|
new_output = self.command_execution.stdout_file.read()
|
||||||
@@ -362,8 +361,6 @@ class NmapOutputViewer (gtk.VBox):
|
|||||||
return
|
return
|
||||||
|
|
||||||
self.output_file_pointer = self.command_execution.stdout_file.tell()
|
self.output_file_pointer = self.command_execution.stdout_file.tell()
|
||||||
# print "read %d -> %d %d" % (
|
|
||||||
# pos, self.output_file_pointer, len(new_output))
|
|
||||||
|
|
||||||
v_adj = self.scrolled.get_vadjustment()
|
v_adj = self.scrolled.get_vadjustment()
|
||||||
if new_output and v_adj is not None:
|
if new_output and v_adj is not None:
|
||||||
|
|||||||
@@ -374,7 +374,6 @@ class OptionTab(object):
|
|||||||
return label_widget, option_list_widget
|
return label_widget, option_list_widget
|
||||||
|
|
||||||
def __parse_option_check(self, option_check):
|
def __parse_option_check(self, option_check):
|
||||||
arg_type = option_check.getAttribute(u'arg_type')
|
|
||||||
option = option_check.getAttribute(u'option')
|
option = option_check.getAttribute(u'option')
|
||||||
label = _(option_check.getAttribute(u'label'))
|
label = _(option_check.getAttribute(u'label'))
|
||||||
short_desc = _(option_check.getAttribute(u'short_desc'))
|
short_desc = _(option_check.getAttribute(u'short_desc'))
|
||||||
|
|||||||
@@ -283,7 +283,6 @@ class HIGSpinnerCache:
|
|||||||
def load_static_from_lookup(self, icon_name="gnome-spinner-rest",
|
def load_static_from_lookup(self, icon_name="gnome-spinner-rest",
|
||||||
key_name=None):
|
key_name=None):
|
||||||
icon_info = self.icon_theme.lookup_icon(icon_name, -1, 0)
|
icon_info = self.icon_theme.lookup_icon(icon_name, -1, 0)
|
||||||
size = icon_info.get_base_size()
|
|
||||||
filename = icon_info.get_filename()
|
filename = icon_info.get_filename()
|
||||||
|
|
||||||
# Now that we have a filename, call load_static_from_filename()
|
# Now that we have a filename, call load_static_from_filename()
|
||||||
|
|||||||
Reference in New Issue
Block a user