#NEWLINE# def save( self , * args , **kwargs ) : #NEWLINE# #INDENT# if ( ( self . email_box_type == 'imap' ) and ( not self . email_box_imap_folder ) ) : #NEWLINE# #INDENT# self . email_box_imap_folder = 'INBOX' #NEWLINE# #UNINDENT# if self . socks_proxy_type : #NEWLINE# #INDENT# if ( not self . socks_proxy_host ) : #NEWLINE# #INDENT# self . socks_proxy_host = '127.0.0.1' #NEWLINE# #UNINDENT# if ( not self . socks_proxy_port ) : #NEWLINE# #INDENT# self . socks_proxy_port = 9150 #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . socks_proxy_host = None #NEWLINE# self . socks_proxy_port = None #NEWLINE# #UNINDENT# if ( not self . email_box_port ) : #NEWLINE# #INDENT# if ( ( self . email_box_type == 'imap' ) and self . email_box_ssl ) : #NEWLINE# #INDENT# self . email_box_port = 993 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( self . email_box_type == 'imap' ) and ( not self . email_box_ssl ) ) : #NEWLINE# #INDENT# self . email_box_port = 143 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( self . email_box_type == 'pop3' ) and self . email_box_ssl ) : #NEWLINE# #INDENT# self . email_box_port = 995 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( self . email_box_type == 'pop3' ) and ( not self . email_box_ssl ) ) : #NEWLINE# #INDENT# self . email_box_port = 110 #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( not self . id ) : #NEWLINE# #INDENT# basename = self . prepare_permission_name ( ) #NEWLINE# Permission . objects . create ( name = ( _ ( 'Permission for queue: ' ) + self . title ) , content_type = ContentType . objects . get ( model = 'queue' ) , codename = basename ) #NEWLINE# #UNINDENT# super ( Queue , self ) . save ( * args , ** kwargs )