From 4ec4ae6a8f411746085c03baa3adcc8e3fadf708 Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Wed, 4 Jan 2012 21:18:24 -0800 Subject: [PATCH] Use output() instead of calling print directly --- src/py65/monitor.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/py65/monitor.py b/src/py65/monitor.py index 7746152..f99342e 100644 --- a/src/py65/monitor.py +++ b/src/py65/monitor.py @@ -50,7 +50,7 @@ class Monitor(cmd.Cmd): options, args = getopt.getopt(argv[1:], 'hm:l:r:g:', ['help', 'mpu=', 'load=', 'rom=', 'goto=']) except getopt.GetoptError, err: - print str(err) + self._output(str(err)) self.usage() sys.exit(1) @@ -68,7 +68,9 @@ class Monitor(cmd.Cmd): self.do_goto(value) if opt in ('-m','--mpu'): if self._get_mpu(value) is None: - print "Fatal: no such mpu. Available MPUs:", ', '.join(self.Microprocessors.keys()) + mpus = ', '.join(self.Microprocessors.keys()) + msg = "Fatal: no such MPU. Available MPUs: " + mpus + self._output(msg) sys.exit(1) self.do_mpu(value) elif opt in ("-h", "--help"):