fix initializing a variable
This commit is contained in:
		
							parent
							
								
									1c6214fb34
								
							
						
					
					
						commit
						75f32f538b
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1360,13 +1360,13 @@ def get_subscription_request_msg(account=None):
 | 
			
		|||
 | 
			
		||||
def replace_dataform_media(form, stanza):
 | 
			
		||||
    import xmpp
 | 
			
		||||
    found = False
 | 
			
		||||
    for field in form.getTags('field'):
 | 
			
		||||
        for media in field.getTags('media'):
 | 
			
		||||
            for uri in media.getTags('uri'):
 | 
			
		||||
                uri_data = uri.getData()
 | 
			
		||||
                if uri_data.startswith('cid:'):
 | 
			
		||||
                    uri_data = uri_data[4:]
 | 
			
		||||
                    found = False
 | 
			
		||||
                    for data in stanza.getTags('data', namespace=xmpp.NS_BOB):
 | 
			
		||||
                        if data.getAttr('cid') == uri_data:
 | 
			
		||||
                            uri.setData(data.getData())
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue