Changeset 122:df824ebd5734

Show
Ignore:
Timestamp:
03/24/09 10:02:34 (16 months ago)
Author:
Nicolas ?vrard <nicoe@…>
Branch:
default
Message:

Print original traceback when a module can not be loaded.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • relatorio/templates/__init__.py

    r80 r122  
    1111# This program is distributed in the hope that it will be useful, but WITHOUT 
    1212# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
    13 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more  
     13# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 
    1414# details. 
    1515# 
     
    1919############################################################################### 
    2020 
     21import traceback 
    2122import warnings 
    2223 
     
    2627    try: 
    2728        __import__('relatorio.templates.%s' % name) 
    28     except: 
     29    except Exception, e: 
    2930        warnings.warn("Unable to load plugin '%s', you will not be able " 
    3031                      "to use it" % name) 
     32        print 'Original traceback' 
     33        print '-' * 80 
     34        print 
     35        traceback.print_exc()