#NEWLINE# @ argh_named ( 'import' ) #NEWLINE# @ arg_verbose #NEWLINE# @ argh . arg ( 'source' , help = 'source dir/file' , nargs = '+' ) #NEWLINE# @ expects_obj #NEWLINE# def handle_import( self , arg ) : #NEWLINE# #INDENT# 'import nodes/configs' #NEWLINE# confman = self . get_confman ( arg . root_dir ) #NEWLINE# for glob_pattern in arg . source : #NEWLINE# #INDENT# sources = glob . glob ( glob_pattern ) #NEWLINE# if ( not sources ) : #NEWLINE# #INDENT# raise errors . UserError ( ( "'%s' does not match any files or directories" % sources ) ) #NEWLINE# #UNINDENT# for source_path in sources : #NEWLINE# #INDENT# source = importer . get_importer ( source_path , verbose = arg . verbose ) #NEWLINE# source . import_to ( confman )