group_delete. Chat/group feature helper or route handler. This docstring was expanded to make future maintenance easier. Args: gid: Parameter. Returns: Varies.
(gid: int)
| 14439 | return redirect(url_for("chat_with", username=username)) |
| 14440 | |
| 14441 | except Exception as e: |
| 14442 | try: |
| 14443 | conn.rollback() |
| 14444 | except Exception: |
| 14445 | pass |
| 14446 | |
| 14447 | # Remove any files written before the failure. |
| 14448 | for sp in saved_paths: |
| 14449 | try: |
| 14450 | if sp and os.path.exists(sp): |
| 14451 | os.remove(sp) |
| 14452 | except Exception: |
| 14453 | pass |
| 14454 | |
| 14455 | log.exception("dm_send failed: %s", e) |
| 14456 | if is_ajax: |
| 14457 | return jsonify(ok=False, error="Send failed"), 500 |
| 14458 | flash("Send failed.") |
| 14459 | return redirect(url_for("chat_with", username=username)) |
| 14460 | finally: |
| 14461 | try: |
| 14462 | conn.close() |
| 14463 | except Exception: |
| 14464 | pass |
| 14465 |
nothing calls this directly
no test coverage detected