#NEWLINE# def _ApproveProposal( self , p , filename ) : #NEWLINE# #INDENT# if ( not self . IsAdminUser ( ) ) : #NEWLINE# #INDENT# self . redirect ( ( '/admin/package/%s?msg=Only admins can approve proposals' % filename ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# p . proposal . ApproveProposal ( ) #NEWLINE# self . redirect ( ( '/admin/package/%s?msg=Changes approved for %s' % ( filename , filename ) ) ) #NEWLINE# #UNINDENT# except models . PackageInfoProposalApprovalError : #NEWLINE# #INDENT# self . redirect ( ( '/admin/package/%s?msg=Unable to approve changes to %s' % ( filename , filename ) ) ) #NEWLINE# #UNINDENT# except models . PackageInfoLockError : #NEWLINE# #INDENT# self . redirect ( ( '/admin/package/%s?msg=Unable to approve changes, package is locked.' % filename ) ) #NEWLINE# #UNINDENT# except models . PackageInfoUpdateError : #NEWLINE# #INDENT# self . redirect ( ( '/admin/package/%s?msg=Unable to approve changes, a package with the same name already in catalog.' % filename ) )