- fd = file(pagefile, 'r')
- pagedata = json.loads(fd.read())
- rvs = [int(x) for x in pagedata.keys()]
- rvs.sort()
- return rvs
+ if os.path.exists(pagefile):
+ fd = file(pagefile, 'r')
+ pagedata = json.loads(fd.read())
+ rvs = [int(x) for x in pagedata.keys()]
+ rvs.sort()
+ return rvs
+ else:
+ return [None,]