def get_hardware_prefix():
 with open('/proc/cmdline', 'r') as f:
  line = f.readline()
  settings = line.split(' ')
  prefix = None
  for setting in settings:
   if setting.startswith('osmcdev='):
    return setting[len('osmcdev='):]
 return None

def get_hardware_prefix ( ) : with open ( '/proc/cmdline' , 'r' ) as f : line = f . readline ( ) settings = line . split ( ' ' ) prefix = None for setting in settings : if setting . startswith ( 'osmcdev=' ) : return setting [ len ( 'osmcdev=' ) : ] return None
returns the prefix for the hardware type .