Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main(self, force=False, **kw):
settings.SITE.startup()
outputbase = os.path.join(settings.MEDIA_ROOT, 'cache', 'screenshots')
urlbase = "http://" + ADDR + ":" + str(PORT)
#~ urlbase="http://127.0.0.1:8000"
pp = SubProcessParent()
server = Process(target=self.start_server)
server.start()
#~ server.join()
logger.info("started the server")
count = 0
assert not settings.SITE.remote_user_header
try:
for lng in settings.SITE.languages:
if lng.django_code == 'de': # temporary
for ss in screenshots.get_screenshots(lng.django_code):
#~ print "20130515 got screenshot", ss
target = ss.get_filename(outputbase)
if not force and os.path.exists(target):
logger.info("%s exists", target)
continue