#NEWLINE# def __call__( self , filename , in_path = None ) : #NEWLINE# #INDENT# paths = [ in_path , self . build . files ] #NEWLINE# self . message ( ( 'wget %s' % filename ) , 'cmd' , indent = 4 ) #NEWLINE# _file = os . path . basename ( filename ) #NEWLINE# for p in paths : #NEWLINE# #INDENT# if ( not p ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if os . path . exists ( os . path . join ( p , _file ) ) : #NEWLINE# #INDENT# self . message ( ( 'The file is already existed in %s directory!' % p ) , 'info' , indent = 4 ) #NEWLINE# return os . path . join ( p , _file ) #NEWLINE# #UNINDENT# #UNINDENT# in_path = ( in_path or self . build . files ) #NEWLINE# self . sh ( ( 'wget -c -N ' + filename ) , cwd = in_path , log = self . log ) #NEWLINE# return os . path . join ( in_path , _file )