| 78 |
|
|
| 79 |
# Read the wnpp information. [PvR] |
# Read the wnpp information. [PvR] |
| 80 |
wnpp = {} |
wnpp = {} |
| 81 |
if os.path.exists(dir + "/wnpp.txt"): |
if os.path.exists(dir + "/wnpp_rm"): |
| 82 |
f = open(dir + "/wnpp.txt") |
f = open(dir + "/wnpp_rm") |
| 83 |
while 1: |
while 1: |
| 84 |
line = f.readline() |
line = f.readline() |
| 85 |
if not line: break # eof |
if not line: break # eof |
| 86 |
line = line.strip() |
(package, type, number) = line.split("|")[0].split() |
| 87 |
try: |
wnpp[package[:-1]] = (type, number) |
|
(package, type, number, age) = line.split(None,3) |
|
|
wnpp[package] = (type, number) |
|
|
except ValueError: # erroneous entry in wnpp.txt, ignore it |
|
|
line = line # no-op |
|
| 88 |
f.close() |
f.close() |
| 89 |
|
|
| 90 |
# Read watch information [FG] |
# Read watch information [FG] |