Ignore:
Timestamp:
18/04/07 08:36:04 (13 years ago)
Author:
lawrence
Message:

Handling empty documents and errors from DIF loading better

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI07-MOLES/trunk/PythonCode/wsgi/DIF.py

    r2392 r2417  
    5454                    l=min(len(xml),300)-1 
    5555                    if l!=len(xml):xml=xml[0:l]+'\n...' 
    56                     raise ValueError,'DIF input cannot be parsed into an ElementTree instance:\n%s'%xml 
     56                    raise ValueError('DIF input cannot be parsed into an ElementTree instance:\n%s'%xml) 
    5757                else: 
    58                     raise TypeError,'DIF input of type [%s] needs to be a string!'%type(xml) 
     58                    raise TypeError('DIF input of type [%s] needs to be a string!'%type(xml)) 
    5959         
    6060        self.debug=debug 
Note: See TracChangeset for help on using the changeset viewer.