Compare commits

..

No commits in common. "f35b8b93b1525e5dec137e08e461cb4389429c79" and "3e2293195a7b1da902b7c5c6717dc0f9e37d1330" have entirely different histories.

3 changed files with 4 additions and 12 deletions

View File

@ -75,11 +75,7 @@ def log_uncaught_exceptions(_ex_cls, ex, tb):
print("\033[1;31;47m")
logging.critical("".join(traceback.format_tb(tb)))
print("\033[1;37;40m")
print(
stackprinter.format(
ex, suppressed_paths=["/pypoetry/virtualenvs/"], style="darkbg"
)
)
print(stackprinter.format(ex, style="darkbg"))
if os.environ["MM_ENV"] == "PRODUCTION":
msg = stackprinter.format(ex)
send_mail(

View File

@ -731,7 +731,7 @@ class Tracks(Base):
def get_all(cls, session) -> List["Tracks"]:
"""Return a list of all tracks"""
return session.execute(select(cls)).scalars().unique().all()
return session.execute(select(cls)).scalars().all()
@classmethod
def get_by_path(cls, session: scoped_session, path: str) -> Optional["Tracks"]:
@ -742,7 +742,7 @@ class Tracks(Base):
try:
return session.execute(
select(Tracks).where(Tracks.path == path)
).unique().scalar_one()
).scalar_one()
except NoResultFound:
return None

View File

@ -2180,9 +2180,5 @@ if __name__ == "__main__":
)
else:
print("\033[1;31;47mUnhandled exception starts")
print(
stackprinter.format(
exc, suppressed_paths=["/pypoetry/virtualenvs/"], style="darkbg"
)
)
print(stackprinter.format(exc, style="darkbg"))
print("Unhandled exception ends\033[1;37;40m")