That still was the wrong place, it was initialized too early. Fixed.
This commit is contained in:
		
							parent
							
								
									91211e189d
								
							
						
					
					
						commit
						4c3dc0b092
					
				
					 1 changed files with 14 additions and 13 deletions
				
			
		| 
						 | 
				
			
			@ -167,19 +167,6 @@ class Connection(ConnectionHandlers):
 | 
			
		|||
 | 
			
		||||
		if gajim.otr_module:
 | 
			
		||||
			self.otr_userstates = gajim.otr_module.otrl_userstate_create()
 | 
			
		||||
 | 
			
		||||
			try:
 | 
			
		||||
				gajim.otr_module.otrl_privkey_read(self.otr_userstates,
 | 
			
		||||
					os.path.join(gajim.gajimpaths.root,
 | 
			
		||||
					'%s.key' % self.name).encode())
 | 
			
		||||
				gajim.otr_module.otrl_privkey_read_fingerprints(
 | 
			
		||||
					self.otr_userstates, os.path.join(
 | 
			
		||||
					gajim.gajimpaths.root, '%s.fpr' %
 | 
			
		||||
					self.name).encode(),
 | 
			
		||||
					(gajim.otr_add_appdata, self.name))
 | 
			
		||||
			except Exception, e:
 | 
			
		||||
				if not hasattr(e, 'os_errno') or e.os_errno != 2:
 | 
			
		||||
					raise
 | 
			
		||||
	# END __init__
 | 
			
		||||
 | 
			
		||||
	def put_event(self, ev):
 | 
			
		||||
| 
						 | 
				
			
			@ -912,6 +899,20 @@ class Connection(ConnectionHandlers):
 | 
			
		|||
		self.on_connect_auth = self._init_roster
 | 
			
		||||
		self.connect_and_auth()
 | 
			
		||||
 | 
			
		||||
		if gajim.otr_module:
 | 
			
		||||
			try:
 | 
			
		||||
				gajim.otr_module.otrl_privkey_read(self.otr_userstates,
 | 
			
		||||
					os.path.join(gajim.gajimpaths.root,
 | 
			
		||||
					'%s.key' % self.name).encode())
 | 
			
		||||
				gajim.otr_module.otrl_privkey_read_fingerprints(
 | 
			
		||||
					self.otr_userstates, os.path.join(
 | 
			
		||||
					gajim.gajimpaths.root, '%s.fpr' %
 | 
			
		||||
					self.name).encode(),
 | 
			
		||||
					(gajim.otr_add_appdata, self.name))
 | 
			
		||||
			except Exception, e:
 | 
			
		||||
				if not hasattr(e, 'os_errno') or e.os_errno != 2:
 | 
			
		||||
					raise
 | 
			
		||||
 | 
			
		||||
	def _init_roster(self, con):
 | 
			
		||||
		self.connection = con
 | 
			
		||||
		if not self.connection:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue