#NEWLINE# def main( ) : #NEWLINE# #INDENT# import optparse #NEWLINE# p = optparse . OptionParser ( 'Usage: %prog xml_export.xml /path/to/trac/environment' ) #NEWLINE# ( opt , args ) = p . parse_args ( ) #NEWLINE# if ( len ( args ) != 2 ) : #NEWLINE# #INDENT# p . error ( 'Incorrect number of arguments' ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# importData ( open ( args [ 0 ] ) , args [ 1 ] , opt ) #NEWLINE# #UNINDENT# except DBNotEmpty as e : #NEWLINE# #INDENT# print ( ( 'Error: ' + e ) ) #NEWLINE# sys . exit ( 1 ) #NEWLINE# #UNINDENT# print ( complete_msg )