def _read_link(name):
 alt_link_path = '/etc/alternatives/{0}'.format(name)
 return os.readlink(alt_link_path)

def _read_link ( name ) : alt_link_path = '/etc/alternatives/{0}' . format ( name ) return os . readlink ( alt_link_path )
read the link from /etc/alternatives throws an oserror if the link does not exist .