def owner_of_lock(id):
 import pwd
 try:
  statinfo = os.lstat(_lock_file(id))
  return pwd.getpwuid(statinfo.st_uid).pw_name
 except:
  return ''

def owner_of_lock ( id ) : import pwd try : statinfo = os . lstat ( _lock_file ( id ) ) return pwd . getpwuid ( statinfo . st_uid ) . pw_name except : return ''
username that has locked the device id .