fd
This commit is contained in:
parent
e5ff4165b9
commit
44ce46513a
3 changed files with 8 additions and 6 deletions
|
@ -110,7 +110,7 @@ def upload_video(file):
|
|||
resp = r.json()['data']
|
||||
except requests.HTTPError as e:
|
||||
raise UploadException("Invalid video. Make sure it's 1 minute long or shorter.")
|
||||
except Exception:
|
||||
except:
|
||||
raise UploadException("Error, please try again later.")
|
||||
finally:
|
||||
remove(file_path)
|
||||
|
|
|
@ -212,7 +212,7 @@ def sanitize(sanitized, noimages=False):
|
|||
|
||||
try:
|
||||
if not session.get("favorite_emojis"): session["favorite_emojis"] = {}
|
||||
except Exception:
|
||||
except:
|
||||
pass
|
||||
|
||||
if start in sanitized and end in sanitized and start in sanitized.split(end)[0] and end in sanitized.split(start)[1]: sanitized = sanitized.replace(start, '<span class="spoiler">').replace(end, '</span>')
|
||||
|
@ -224,7 +224,7 @@ def sanitize(sanitized, noimages=False):
|
|||
try:
|
||||
if i.group(1) in session["favorite_emojis"]: session["favorite_emojis"][i.group(1)] += 1
|
||||
else: session["favorite_emojis"][i.group(1)] = 1
|
||||
except Exception:
|
||||
except:
|
||||
pass
|
||||
|
||||
for i in re.finditer(':([^ ]{1,30}?):', sanitized):
|
||||
|
@ -234,7 +234,7 @@ def sanitize(sanitized, noimages=False):
|
|||
try:
|
||||
if i.group(1) in session["favorite_emojis"]: session["favorite_emojis"][i.group(1)] += 1
|
||||
else: session["favorite_emojis"][i.group(1)] = 1
|
||||
except Exception:
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
@ -82,6 +82,7 @@ def check_ban_evade(v):
|
|||
comment.ban_reason="ban evasion"
|
||||
g.db.add(comment)
|
||||
|
||||
try:
|
||||
ma=ModAction(
|
||||
kind="ban_comment",
|
||||
user_id=AUTOJANNY_ACCOUNT,
|
||||
|
@ -89,6 +90,7 @@ def check_ban_evade(v):
|
|||
note="ban evasion"
|
||||
)
|
||||
g.db.add(ma)
|
||||
except: pass
|
||||
|
||||
g.db.flush()
|
||||
try: abort(403)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue