import random class Crawler: def __init__(self, seedurl): if random.uniform(0,1)<0.5: raise Exception('Simulating crawler failure') print 'Crawler failed' print seedurl #print "This is a crawler-shell. Not used for anything except the testing of the cron jobs"