|
|
data = f.read() | data = f.read() |
f.close() | f.close() |
| |
if data.startswith('8'): |
if data.startswith('8') or data.startswith('9'): |
data = map(str.splitlines,data.split('\n\x0c\n')) | data = map(str.splitlines,data.split('\n\x0c\n')) |
del data[0][0] # get rid of the '8' |
del data[0][0] # get rid of the '8' or '9' |
dirurl = data[0][3] | dirurl = data[0][3] |
localrev = max([int(d[9]) for d in data if len(d)>9 and d[9]]+[0]) | localrev = max([int(d[9]) for d in data if len(d)>9 and d[9]]+[0]) |
elif data.startswith('<?xml'): | elif data.startswith('<?xml'): |