This is shorter. 

    if platform.dist()[0] in ['Ubuntu', 'Debian', 'LinuxMint'] :

Could possibly also add  .lower()  if it's case sensitive