#NEWLINE# def upload_pdf( branch ) : #NEWLINE# #INDENT# if ( branch == 'master' ) : #NEWLINE# #INDENT# remote_dir = 'devel' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# remote_dir = 'stable' #NEWLINE# #UNINDENT# os . chdir ( os . path . join ( dname , new_branch_dir , 'statsmodels' , 'docs' ) ) #NEWLINE# retcode = subprocess . call ( [ 'rsync' , '-avP' , '-e ssh' , 'build/latex/statsmodels.pdf' , ( ( ( sf_account + ':htdocs/' ) + remote_dir ) + 'pdf/' ) ] ) #NEWLINE# if ( retcode != 0 ) : #NEWLINE# #INDENT# msg = ( 'Could not upload pdf to %s for branch %s' % ( ( remote_dir + '/pdf' ) , branch ) ) #NEWLINE# raise Exception ( msg ) #NEWLINE# #UNINDENT# os . chdir ( dname )