diff --git a/zenmap/radialnet/gui/LegendWindow.py b/zenmap/radialnet/gui/LegendWindow.py index 096348e1e..1aa691db2 100644 --- a/zenmap/radialnet/gui/LegendWindow.py +++ b/zenmap/radialnet/gui/LegendWindow.py @@ -222,7 +222,6 @@ class LegendWindow(gtk.Window): """ """ self.graphic_context = widget.window.cairo_create() - w, h = widget.window.get_size() x, y = 45, 20 draw_heading(self.graphic_context, x, y, _("Hosts")) diff --git a/zenmap/radialnet/gui/RadialNet.py b/zenmap/radialnet/gui/RadialNet.py index 3620e4f29..aae782f68 100644 --- a/zenmap/radialnet/gui/RadialNet.py +++ b/zenmap/radialnet/gui/RadialNet.py @@ -835,7 +835,6 @@ class RadialNet(gtk.DrawingArea): @rtype: boolean @return: Indicator of the event propagation """ - xc, yc = self.__center_of_widget pointer = self.get_pointer() for node in self.__graph.get_nodes(): @@ -871,8 +870,6 @@ class RadialNet(gtk.DrawingArea): @rtype: boolean @return: Indicator of the event propagation """ - allocation = self.get_allocation() - context = widget.window.cairo_create() context.rectangle(*event.area) @@ -894,7 +891,6 @@ class RadialNet(gtk.DrawingArea): self.__center_of_widget = (allocation.width / 2, allocation.height / 2) - aw, ah = allocation.width, allocation.height xc, yc = self.__center_of_widget ax, ay = self.__translation @@ -926,7 +922,6 @@ class RadialNet(gtk.DrawingArea): if node.get_draw_info('region') is not None and not_grouped: - x, y = node.get_cartesian_coordinate() xc, yc = self.__center_of_widget r, g, b = REGION_COLORS[node.get_draw_info('region')] @@ -1908,7 +1903,6 @@ class NetNode(Node): for port in host.ports: if port["port_state"] == "filtered": return True - break return False elif info == "ports": ports = list() diff --git a/zenmap/zenmapCore/NSEDocParser.py b/zenmap/zenmapCore/NSEDocParser.py index aeb9add34..2e916d450 100644 --- a/zenmap/zenmapCore/NSEDocParser.py +++ b/zenmap/zenmapCore/NSEDocParser.py @@ -161,7 +161,6 @@ def nsedoc_parse(text): "list_item_end", "text", or "code". The types "text" and "code" have a text member with the text that they contain.""" i = 0 - j = 0 in_list = False while i < len(text): diff --git a/zenmap/zenmapGUI/NmapOutputViewer.py b/zenmap/zenmapGUI/NmapOutputViewer.py index 55e92f81d..e128f3bab 100644 --- a/zenmap/zenmapGUI/NmapOutputViewer.py +++ b/zenmap/zenmapGUI/NmapOutputViewer.py @@ -353,7 +353,6 @@ class NmapOutputViewer (gtk.VBox): # Seek to the end of the most recent read. self.command_execution.stdout_file.seek(self.output_file_pointer) - pos = self.command_execution.stdout_file.tell() try: new_output = self.command_execution.stdout_file.read() @@ -362,8 +361,6 @@ class NmapOutputViewer (gtk.VBox): return 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() if new_output and v_adj is not None: diff --git a/zenmap/zenmapGUI/OptionBuilder.py b/zenmap/zenmapGUI/OptionBuilder.py index 0da45c40f..5bd400b98 100644 --- a/zenmap/zenmapGUI/OptionBuilder.py +++ b/zenmap/zenmapGUI/OptionBuilder.py @@ -374,7 +374,6 @@ class OptionTab(object): return label_widget, option_list_widget def __parse_option_check(self, option_check): - arg_type = option_check.getAttribute(u'arg_type') option = option_check.getAttribute(u'option') label = _(option_check.getAttribute(u'label')) short_desc = _(option_check.getAttribute(u'short_desc')) diff --git a/zenmap/zenmapGUI/higwidgets/higspinner.py b/zenmap/zenmapGUI/higwidgets/higspinner.py index 93793daee..c80613fb5 100644 --- a/zenmap/zenmapGUI/higwidgets/higspinner.py +++ b/zenmap/zenmapGUI/higwidgets/higspinner.py @@ -283,7 +283,6 @@ class HIGSpinnerCache: def load_static_from_lookup(self, icon_name="gnome-spinner-rest", key_name=None): icon_info = self.icon_theme.lookup_icon(icon_name, -1, 0) - size = icon_info.get_base_size() filename = icon_info.get_filename() # Now that we have a filename, call load_static_from_filename()