def parse_udev(self):
    'Parse udev for properties of current disc'
    context = pyudev.Context()
    device = pyudev.Devices.from_device_file(context, self.devpath)
    self.disctype = 'unknown'
    for (key, value) in device.items():
        if (key == 'ID_FS_LABEL'):
            self.label = value
            if (value == 'iso9660'):
                self.disctype = 'data'
        elif (key == 'ID_CDROM_MEDIA_BD'):
            self.disctype = 'bluray'
        elif (key == 'ID_CDROM_MEDIA_DVD'):
            self.disctype = 'dvd'
        elif (key == 'ID_CDROM_MEDIA_TRACK_COUNT_AUDIO'):
            self.disctype = 'music'
        else:
            pass
Parse udev for properties of current disc
def parse_udev(self):
    
    context = pyudev.Context()
    device = pyudev.Devices.from_device_file(context, self.devpath)
    self.disctype = 'unknown'
    for (key, value) in device.items():
        if (key == 'ID_FS_LABEL'):
            self.label = value
            if (value == 'iso9660'):
                self.disctype = 'data'
        elif (key == 'ID_CDROM_MEDIA_BD'):
            self.disctype = 'bluray'
        elif (key == 'ID_CDROM_MEDIA_DVD'):
            self.disctype = 'dvd'
        elif (key == 'ID_CDROM_MEDIA_TRACK_COUNT_AUDIO'):
            self.disctype = 'music'
        else:
            pass