1
0
mirror of https://github.com/mnaberez/py65.git synced 2024-06-06 20:29:34 +00:00

Remove use of deprecated module asyncore

This commit is contained in:
Mike Naberezny 2023-06-24 08:51:51 -07:00
parent ca02d12fc6
commit b710c742ac

View File

@ -20,8 +20,8 @@ import os
import re import re
import shlex import shlex
import sys import sys
import traceback
from asyncore import compact_traceback
from urllib.request import urlopen from urllib.request import urlopen
from py65.devices.mpu6502 import MPU as NMOS6502 from py65.devices.mpu6502 import MPU as NMOS6502
@ -160,9 +160,8 @@ class Monitor(cmd.Cmd):
result = cmd.Cmd.onecmd(self, line) result = cmd.Cmd.onecmd(self, line)
except KeyboardInterrupt: except KeyboardInterrupt:
self._output("Interrupt") self._output("Interrupt")
except Exception: except Exception as e:
(file, fun, line), t, v, tbinfo = compact_traceback() error = ''.join(traceback.format_exception(e))
error = 'Error: %s, %s: file: %s line: %s' % (t, v, file, line)
self._output(error) self._output(error)
if not line.startswith("quit"): if not line.startswith("quit"):