def debugitems(): with web_pdb.catch_post_mortem(): for epdate, eplink, epname in matches: item = category_episodemake(epname, eplink, epdate) # itempath = plugin.url_for(endpoint=episode, name=epname, url=eplink) dateout = epdate.replace(' ', '-').strip() item.label += " [I][B][COLOR orange]{0}[/COLOR][/B][/I]".format(dateout) litems.append(item) litems.append(itemnext)
def on_exception(request): log.info("Hello Pycon") talks = Talk.objects.all().select_related() import web_pdb with web_pdb.catch_post_mortem(): raise Exception("Whoops") log.info("Rendering") return render(request, 'webpdbexample/index.html', { 'year': 2016, "talks": talks })
def get_following(): allfollowedblogs = [] if doDebug(): web_pdb.set_trace() with web_pdb.catch_post_mortem(): allfollowedblogs = refresh_following() save_following(allblogs=allfollowedblogs) return allfollowedblogs else: allfollowedblogs = refresh_following() save_following(allblogs=allfollowedblogs) return allfollowedblogs
# coding: utf-8 # Created on: 16.09.2016 # Author: Roman Miroshnychenko aka Roman V.M. ([email protected]) import os import sys basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(basedir) import web_pdb with web_pdb.catch_post_mortem(): assert False, 'Oops!'