def ready(self):
    if (not os.path.exists(self.dev)):
        return False
    mode = os.stat(self.dev).st_mode
    if (not stat.S_ISBLK(mode)):
        return False
    return True
def ready(self):
    if (not os.path.exists(self.dev)):
        return False
    mode = os.stat(self.dev).st_mode
    if (not stat.S_ISBLK(mode)):
        return False
    return True