()
| 7 | import subprocess |
| 8 | |
| 9 | def GetDistroInfo(): |
| 10 | DistroName = "Unknown" |
| 11 | DistroVersion = "Unknown" |
| 12 | |
| 13 | with open("/etc/lsb-release", 'r') as f: |
| 14 | while True: |
| 15 | Line = f.readline() |
| 16 | if not Line: |
| 17 | break |
| 18 | Split = Line.split("=") |
| 19 | if Split[0] == "DISTRIB_ID": |
| 20 | DistroName = Split[1].lower().rstrip() |
| 21 | if Split[0] == "DISTRIB_RELEASE": |
| 22 | DistroVersion = Split[1].rstrip() |
| 23 | |
| 24 | return [DistroName, DistroVersion] |
| 25 | |
| 26 | def FindBestImageFit(Distro, links_file): |
| 27 | CurrentFitSize = 0 |