Ticket #374 (closed defect: fixed)

Opened 6 months ago

Last modified 6 months ago

Umit Crash - 'Invalid section name: default'

Reported by: sotahatano@… Owned by: boltrix
Priority: medium Milestone: Umit 1.0RC
Component: CrashReport Version: current svn
Keywords: user crash Cc: boltrix, ignotus

Description (last modified by luis) (diff)

Crash Report
==========

sys.platform win32
os.name nt
Gtk version 2.16.4
Umit version 1.0RC

Description


Versions:
---
GTK: 2.16.4
PyGTK: 2.14.2
HIGWidgets: 1.0RC
Python: 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
Nmap: Nmap version 5.00 ( http://nmap.org )
Operating System: post2008Server 6.1.7600  Multiprocessor Free
Umit: 1.0RC
UmitCore: 1.0RC
UmitGUI: 1.0RC
---
<type 'exceptions.ValueError'>
Python 2.6.2: C:\Program Files\Umit\umit.exe
Wed Jan 20 02:13:00 2010

A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.

 C:\Program Files\Umit\umit\gui\Wizard.pyo in save_profile(self=<Wizard object at 0x3235120 (GtkWindow at 0x28e7238)>, widget=<HIGButton object at 0x335b210 (GtkButton at 0x293b258)>)


 C:\Program Files\Umit\umit\core\UmitConf.pyo in add_profile(self=<umit.core.UmitConf.CommandProfile object at 0x0322D550>, profile_name='default', **attributes={'annotation': '', 'command': u'nmap -PE -T Normal -PB -sS -sO -PM %s', 'description': '', 'hint': '', 'options': {u'Default ping': [], u'ICMP netmask': [], u'ICMP ping': [], u'IP protocol Scan': [], u'Normal': [], u'TCP SYN Scan': []}})


 C:\Program Files\Umit\ConfigParser.pyo in add_section(self=<umit.core.UmitConf.CommandProfile object at 0x0322D550>, section='default')

<type 'exceptions.ValueError'>: Invalid section name: default
    __class__ = <type 'exceptions.ValueError'>
    __delattr__ = <method-wrapper '__delattr__' of exceptions.ValueError object at 0x0335CDA0>
    __dict__ = {}
    __doc__ = 'Inappropriate argument value (of correct type).'
    __format__ = <built-in method __format__ of exceptions.ValueError object at 0x0335CDA0>
    __getattribute__ = <method-wrapper '__getattribute__' of exceptions.ValueError object at 0x0335CDA0>
    __getitem__ = <method-wrapper '__getitem__' of exceptions.ValueError object at 0x0335CDA0>
    __getslice__ = <method-wrapper '__getslice__' of exceptions.ValueError object at 0x0335CDA0>
    __hash__ = <method-wrapper '__hash__' of exceptions.ValueError object at 0x0335CDA0>
    __init__ = <method-wrapper '__init__' of exceptions.ValueError object at 0x0335CDA0>
    __new__ = <built-in method __new__ of type object at 0x1E1D3B20>
    __reduce__ = <built-in method __reduce__ of exceptions.ValueError object at 0x0335CDA0>
    __reduce_ex__ = <built-in method __reduce_ex__ of exceptions.ValueError object at 0x0335CDA0>
    __repr__ = <method-wrapper '__repr__' of exceptions.ValueError object at 0x0335CDA0>
    __setattr__ = <method-wrapper '__setattr__' of exceptions.ValueError object at 0x0335CDA0>
    __setstate__ = <built-in method __setstate__ of exceptions.ValueError object at 0x0335CDA0>
    __sizeof__ = <built-in method __sizeof__ of exceptions.ValueError object at 0x0335CDA0>
    __str__ = <method-wrapper '__str__' of exceptions.ValueError object at 0x0335CDA0>
    __subclasshook__ = <built-in method __subclasshook__ of type object at 0x1E1D3B20>
    __unicode__ = <built-in method __unicode__ of exceptions.ValueError object at 0x0335CDA0>
    args = ('Invalid section name: default',)
    message = 'Invalid section name: default'

The above is a description of an error in a Python program.  Here is
the original traceback:

Traceback (most recent call last):
  File "umit\gui\Wizard.pyo", line 356, in save_profile
  File "umit\core\UmitConf.pyo", line 199, in add_profile
  File "ConfigParser.pyo", line 242, in add_section
ValueError: Invalid section name: default


Attachments

default_section.patch (431 bytes) - added by luis 6 months ago.
374.patch (3.0 kB) - added by nopper 6 months ago.

Change History

Changed 6 months ago by luis

  • description modified (diff)

Nice bug.

If you set the profile name as default, it will be invalid, then it raise an exception. I'm working in a patch, thanks for reporting.

Changed 6 months ago by luis

Changed 6 months ago by luis

  • cc boltrix, ignotus added

The patched attached avoid this situation. It simply make disappear wizard/profile window. It happens the same with duplicate names.

Do you think that is enough?

Changed 6 months ago by nopper

Well maybe it's better to inform the user about the "reserved" profile name, instead a silent fail. I've attached a stupid patch to achieve this.

Changed 6 months ago by nopper

Changed 6 months ago by luis

The patch works fine. You can commit it. :)

Changed 6 months ago by nopper

  • status changed from new to closed
  • resolution set to fixed

Fixed in r5535.

Add/Change #374 (Umit Crash - 'Invalid section name: default')

Author



Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.