Skip to content

Commit

Permalink
Merge pull request #266 from MelbourneHighSchoolRobotics/quick_2_1_7_fix
Browse files Browse the repository at this point in the history
Quick 2.1.7 fix
  • Loading branch information
glipR authored May 12, 2021
2 parents 0b9ca41 + 775050a commit e3bd74a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ev3sim/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.1.6"
__version__ = "2.1.7"
8 changes: 4 additions & 4 deletions ev3sim/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ def checkVersion():
dest="open_config",
)
parser.add_argument(
"--no-debug",
"--debug",
action="store_true",
help="Disable the debug interface",
dest="no_debug",
help="Enable the debug interface",
dest="debug",
)


Expand Down Expand Up @@ -295,7 +295,7 @@ def action(result):
actual_error = None
error = None

if not args.no_debug:
if args.debug:
try:
import debugpy

Expand Down
9 changes: 9 additions & 0 deletions ev3sim/updates.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
"""Various functions for updating the workspace from earlier versions of ev3sim."""

import yaml
from ev3sim.settings import SettingsManager
from ev3sim.file_helper import ensure_workspace_filled, find_abs, find_abs_directory
from ev3sim.search_locations import config_locations


def check_for_bot_files():
Expand Down Expand Up @@ -101,6 +103,13 @@ def action(result):
}
}
)
# Change user_config to have workspace_folder = ""
config_file = find_abs("user_config.yaml", config_locations())
with open(config_file, "r") as f:
conf = yaml.safe_load(f)
conf["app"]["send_crash_reports"] = result
with open(config_file, "w") as f:
f.write(yaml.dump(conf))

return {
"text": "Send crash reports to make EV3Sim better?",
Expand Down

0 comments on commit e3bd74a

Please sign in to comment.