services/presence/psutils.py: don't bother using sugar.util, it's easier to use hexdigest or sha directly
This commit is contained in:
		
							parent
							
								
									2f8ef7bd3b
								
							
						
					
					
						commit
						9d812430bf
					
				| @ -17,12 +17,15 @@ | ||||
| 
 | ||||
| import logging | ||||
| from string import ascii_letters, digits | ||||
| try: | ||||
|     from hashlib import sha1 | ||||
| except ImportError: | ||||
|     # Python < 2.5 | ||||
|     from sha import new as sha1 | ||||
| 
 | ||||
| import dbus | ||||
| import gobject | ||||
| 
 | ||||
| from sugar import util | ||||
| 
 | ||||
| 
 | ||||
| _logger = logging.getLogger('s-p-s.psutils') | ||||
| 
 | ||||
| @ -39,7 +42,7 @@ def pubkey_to_keyid(key): | ||||
|     :Returns: | ||||
|         The key ID as a string of hex digits | ||||
|     """ | ||||
|     return util.printable_hash(util._sha_data(key)) | ||||
|     return sha1(key).hexdigest() | ||||
| 
 | ||||
| 
 | ||||
| def escape_identifier(identifier): | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Simon McVittie
						Simon McVittie