Explorar el Código

Added try-except around make_post.

Makes it so that we can always save recent activity, as if a later upload fails
we don't save that we got to post earlier ones.
master
Trey Del Bonis hace 2 años
padre
commit
ba2e97c323
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4
    1
      main.py

+ 4
- 1
main.py Ver fichero

@@ -190,7 +190,10 @@ def main():

for p in okps:
print('posting', p['rid'], '-', p['title'])
make_post(masto, p)
try:
make_post(masto, p)
except Exception as e:
print('error posting:', p['rid'], str(e))

save_recents(newrecents)


Cargando…
Cancelar
Guardar