gen.py: disable posting tracebacks
These were kind of doxy for some people and usually weren't helpful anyway.
This commit is contained in:
parent
b6b96a8661
commit
c7c2c6adcf
10
gen.py
10
gen.py
|
@ -32,17 +32,7 @@ async def main():
|
||||||
|
|
||||||
if not args.simulate:
|
if not args.simulate:
|
||||||
async with Pleroma(api_base_url=cfg['site'], access_token=cfg['access_token']) as pl:
|
async with Pleroma(api_base_url=cfg['site'], access_token=cfg['access_token']) as pl:
|
||||||
try:
|
|
||||||
await pl.post(toot, visibility='unlisted', cw=cfg['cw'])
|
await pl.post(toot, visibility='unlisted', cw=cfg['cw'])
|
||||||
except Exception:
|
|
||||||
import traceback
|
|
||||||
toot = (
|
|
||||||
'An error occurred while submitting the generated post. '
|
|
||||||
'Contact KayFaraday@freak.university for assistance. Full traceback:\n\n'
|
|
||||||
+ traceback.format_exc()
|
|
||||||
)
|
|
||||||
await pl.post(toot, visibility='unlisted', cw='Error!')
|
|
||||||
raise
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
print(toot)
|
print(toot)
|
||||||
|
|
Loading…
Reference in New Issue