services/presence/psutils: Remove bytes_to_string - no longer needed
This commit is contained in:
		
							parent
							
								
									43453124bd
								
							
						
					
					
						commit
						2d76475682
					
				@ -21,21 +21,6 @@ import logging
 | 
			
		||||
_logger = logging.getLogger('s-p-s.psutils')
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def bytes_to_string(bytes):
 | 
			
		||||
    """The function converts a  D-BUS byte array provided by dbus to string format.
 | 
			
		||||
    
 | 
			
		||||
    bytes -- a D-Bus array of bytes. Handle both DBus byte arrays and strings
 | 
			
		||||
    
 | 
			
		||||
    """
 | 
			
		||||
    try:
 | 
			
		||||
        # DBus Byte array
 | 
			
		||||
        ret = ''.join([chr(item) for item in bytes])
 | 
			
		||||
    except TypeError:
 | 
			
		||||
        # Python string
 | 
			
		||||
        ret = ''.join([str(item) for item in bytes])
 | 
			
		||||
    return ret
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
NM_SERVICE = 'org.freedesktop.NetworkManager'
 | 
			
		||||
NM_IFACE = 'org.freedesktop.NetworkManager'
 | 
			
		||||
NM_IFACE_DEVICES = 'org.freedesktop.NetworkManager.Devices'
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user