forked from rDrama/rDrama
vdffsd
parent
0805b41394
commit
649f8d5323
|
@ -419,10 +419,6 @@ class Comment(Base):
|
|||
|
||||
return censor_slurs(body, v)
|
||||
|
||||
def print(self):
|
||||
print(f'post: {self.id}, comment: {self.author_id}', flush=True)
|
||||
return ''
|
||||
|
||||
@lazy
|
||||
def collapse_for_user(self, v, path):
|
||||
if v and self.author_id == v.id: return False
|
||||
|
|
|
@ -444,10 +444,6 @@ class Submission(Base):
|
|||
|
||||
return body
|
||||
|
||||
def print(self):
|
||||
print(f'post: {self.id}, author: {self.author_id}', flush=True)
|
||||
return ''
|
||||
|
||||
@lazy
|
||||
def realtitle(self, v):
|
||||
if self.club and not (v and (v.paid_dues or v.id == self.author_id)):
|
||||
|
|
|
@ -28,7 +28,7 @@ def process_video(file):
|
|||
else:
|
||||
spider = os.system(f'ffmpeg -y -loglevel warning -i {name} -map_metadata -1 -c:v copy -c:a copy {name}.mp4')
|
||||
|
||||
if spider: print(f'ffmpeg returned {spider}')
|
||||
if spider: print(f'ffmpeg returned {spider}', flush=True)
|
||||
os.remove(name)
|
||||
|
||||
with open(f"{name}.mp4", 'rb') as f:
|
||||
|
|
|
@ -99,7 +99,7 @@ def callback(attrs, new=False):
|
|||
|
||||
|
||||
def handler(signum, frame):
|
||||
print("Timeout!")
|
||||
print("Timeout!", flush=True)
|
||||
raise Exception("Timeout")
|
||||
|
||||
def render_emoji(html, regexp, edit, marseys_used=set(), b=False):
|
||||
|
|
|
@ -419,7 +419,7 @@ def monthly(v):
|
|||
u.procoins += procoins
|
||||
g.db.add(u)
|
||||
send_repeatable_notification(u.id, f"@{v.username} has given you {procoins} Marseybux for the month of {month}! You can use them to buy awards in the [shop](/shop).")
|
||||
else: print(u.username)
|
||||
else: print(u.username, flush=True)
|
||||
|
||||
if request.host == 'pcmemes.net':
|
||||
u = g.db.query(User).filter_by(id=KIPPY_ID).one()
|
||||
|
|
|
@ -850,7 +850,7 @@ def settings_song_change(v):
|
|||
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
|
||||
try: ydl.download([f"https://youtube.com/watch?v={id}"])
|
||||
except Exception as e:
|
||||
print(e)
|
||||
print(e, flush=True)
|
||||
return render_template("settings_profile.html",
|
||||
v=v,
|
||||
error="Age-restricted videos aren't allowed.")
|
||||
|
|
|
@ -1218,11 +1218,11 @@ def saved_comments(v, username):
|
|||
def fp(v, fp):
|
||||
v.fp = fp
|
||||
users = g.db.query(User).filter(User.fp == fp, User.id != v.id).all()
|
||||
if users: print(f'{v.username}: fp')
|
||||
if users: print(f'{v.username}: fp', flush=True)
|
||||
if v.email and v.is_activated:
|
||||
alts = g.db.query(User).filter(User.email == v.email, User.is_activated, User.id != v.id).all()
|
||||
if alts:
|
||||
print(f'{v.username}: email')
|
||||
print(f'{v.username}: email', flush=True)
|
||||
users += alts
|
||||
for u in users:
|
||||
li = [v.id, u.id]
|
||||
|
@ -1231,7 +1231,7 @@ def fp(v, fp):
|
|||
new_alt = Alt(user1=v.id, user2=u.id)
|
||||
g.db.add(new_alt)
|
||||
g.db.flush()
|
||||
print(v.username + ' + ' + u.username)
|
||||
print(v.username + ' + ' + u.username, flush=True)
|
||||
g.db.add(v)
|
||||
g.db.commit()
|
||||
return '', 204
|
|
@ -30,7 +30,7 @@ def test_signup():
|
|||
"formkey": formkey,
|
||||
"now": form_timestamp
|
||||
})
|
||||
print(f"Signing up as {username}")
|
||||
print(f"Signing up as {username}", flush=True)
|
||||
assert signup_post_response.status_code == 302
|
||||
assert "error" not in signup_post_response.location
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@ was_running = docker_inspect == "running"
|
|||
|
||||
# update containers, just in case they're out of date
|
||||
if was_running:
|
||||
print("Updating containers . . .")
|
||||
print("Updating containers . . .", flush=True)
|
||||
else:
|
||||
print("Starting containers . . .")
|
||||
print("Starting containers . . .", flush=True)
|
||||
subprocess.run([
|
||||
"docker-compose",
|
||||
"up",
|
||||
|
@ -31,7 +31,7 @@ subprocess.run([
|
|||
)
|
||||
|
||||
# run the test
|
||||
print("Running test . . .")
|
||||
print("Running test . . .", flush=True)
|
||||
result = subprocess.run([
|
||||
"docker",
|
||||
"exec",
|
||||
|
@ -41,7 +41,7 @@ result = subprocess.run([
|
|||
|
||||
if not was_running:
|
||||
# shut down, if we weren't running in the first place
|
||||
print("Shutting down containers . . .")
|
||||
print("Shutting down containers . . .", flush=True)
|
||||
subprocess.run([
|
||||
"docker-compose",
|
||||
"stop",
|
||||
|
|
Loading…
Reference in New Issue