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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ out/
*.zip
*_pros_capture.png

venv/
*venv/
.DS_Store

*.pyc
14 changes: 12 additions & 2 deletions pros/common/sentry.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from typing import *

import click
import os
import sys

import pros.common.ui as ui

Expand Down Expand Up @@ -99,8 +101,16 @@ def restore(self, obj):

from sentry_sdk import configure_scope
with configure_scope() as scope:
scope.set_extra((key or obj.__class__.__qualname__), jsonpickle.pickler.Pickler(unpicklable=False).flatten(obj))

try:
scope.set_extra((key or obj.__class__.__qualname__), jsonpickle.pickler.Pickler(unpicklable=False).flatten(obj))
except:
if ui.confirm("Malformed depot detected, do you want to reset conductor.pros? This will remove all depots and templates. You will be unable to create a new PROS project if you do not have internet connection."):
file = os.path.join(click.get_app_dir('PROS'), 'conductor.pros')
if os.path.exists(file):
os.remove(file)
ui.echo("Conductor was reset")
sys.exit()

if override_handlers:
jsonpickle.handlers.unregister(BaseTemplate)

Expand Down
Loading