Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontends/stapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
if sys.stdout is None: sys.stdout = open(os.devnull, "w")
if sys.stderr is None: sys.stderr = open(os.devnull, "w")
try: sys.stdout.reconfigure(errors='replace')
except: pass
except Exception: pass
try: sys.stderr.reconfigure(errors='replace')
except: pass
except Exception: pass
script_dir = os.path.dirname(__file__)
sys.path.append(os.path.abspath(os.path.join(script_dir, '..')))
sys.path.append(os.path.abspath(script_dir))
Expand Down
4 changes: 2 additions & 2 deletions frontends/stapp2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
if sys.stdout is None: sys.stdout = open(os.devnull, "w")
if sys.stderr is None: sys.stderr = open(os.devnull, "w")
try: sys.stdout.reconfigure(errors='replace')
except: pass
except Exception: pass
try: sys.stderr.reconfigure(errors='replace')
except: pass
except Exception: pass
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

import streamlit as st
Expand Down
2 changes: 1 addition & 1 deletion frontends/tgapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from telegram.ext import ApplicationBuilder, CallbackQueryHandler, MessageHandler, filters, ContextTypes
from telegram.helpers import escape_markdown
from telegram.request import HTTPXRequest
except:
except Exception:
print("Please ask the agent install python-telegram-bot to use telegram module.")
sys.exit(1)
from chatapp_common import (
Expand Down
2 changes: 1 addition & 1 deletion frontends/wechatapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def _keep_typing():
if not ticket: return
while not _typing_stop.is_set():
try: bot.send_typing(uid, ticket)
except: pass
except Exception: pass
_typing_stop.wait(2.0)
threading.Thread(target=_keep_typing, daemon=True).start()
result = ''; sent = 0; mi = 0; last_send = 0; item = {}
Expand Down