Changeset 3238 for TI02-CSML


Ignore:
Timestamp:
17/01/08 11:05:25 (11 years ago)
Author:
spascoe
Message:

This was a bug that caused the exception not to be caught.

"except A, B:" is interpreted as catch exception A, setting B to the
exception value. To catch both exceptions use "except (A, B)"

See  http://mail.python.org/pipermail/python-list/2004-January/242795.html.

NOTE: This syntax will change in Python3000. See  http://www.python/org/dev/peps/pep-3110/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/csml/csmlscan.py

    r3065 r3238  
    7777    try: 
    7878        value = self.get(section, option) 
    79     except ConfigParser.NoSectionError,ConfigParser.NoOptionError: 
     79    except (ConfigParser.NoSectionError,ConfigParser.NoOptionError): 
    8080        #config value is not set 
    8181        value =None  
Note: See TracChangeset for help on using the changeset viewer.