def rebuild(self, uploadType='', indexOnly=False, make='', log_dict=False):
if uploadType:
utypes = [uploadType] if uploadType != TOP_LEVEL else []
else:
utypes = self.get_session_names()
if not indexOnly:
WSHandler.lockAllConnections('Site rebuilt. Reload page', reload=True)
msg_dict = {}
msg_list = []
if Options['debug'] :
print >> sys.stderr, 'sdserver.rebuild:', make, utypes
for utype in utypes:
retval = self.compile(utype, dest_dir=self.site_web_dir+privatePrefix(utype)+'/'+utype, indexOnly=indexOnly, make=make)
msgs = retval.get('messages',[])
msg_dict[utype] = msgs
if msgs:
msg_list += msgs + ['']
retval = self.compile(TOP_LEVEL, dest_dir=self.site_web_dir, indexOnly=False, make='')
msgs = retval.get('messages',[])
msg_dict[TOP_LEVEL] = msgs
if msgs:
msg_list += msgs
return msg_dict if log_dict else msg_list
评论列表
文章目录