From b710c742acf37030c8d99d16b931cb3673372566 Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Sat, 24 Jun 2023 08:51:51 -0700 Subject: [PATCH] Remove use of deprecated module asyncore --- py65/monitor.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/py65/monitor.py b/py65/monitor.py index 99f513a..5726281 100644 --- a/py65/monitor.py +++ b/py65/monitor.py @@ -20,8 +20,8 @@ import os import re import shlex import sys +import traceback -from asyncore import compact_traceback from urllib.request import urlopen from py65.devices.mpu6502 import MPU as NMOS6502 @@ -160,9 +160,8 @@ class Monitor(cmd.Cmd): result = cmd.Cmd.onecmd(self, line) except KeyboardInterrupt: self._output("Interrupt") - except Exception: - (file, fun, line), t, v, tbinfo = compact_traceback() - error = 'Error: %s, %s: file: %s line: %s' % (t, v, file, line) + except Exception as e: + error = ''.join(traceback.format_exception(e)) self._output(error) if not line.startswith("quit"):