summaryrefslogtreecommitdiff
path: root/rtemstoolkit/options.py
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-11-12 11:15:23 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-11-12 11:15:23 +0100
commit04a52040aef69910e9ac2218fea48077e34d4017 (patch)
treed7b623bc23ddc2765812cf406e567b4ee7c3e848 /rtemstoolkit/options.py
parentab922fec9c2ce403d870120b5afcc108f06f4aea (diff)
Python 3 compatibility
Diffstat (limited to 'rtemstoolkit/options.py')
-rw-r--r--rtemstoolkit/options.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/rtemstoolkit/options.py b/rtemstoolkit/options.py
index 11e3c5a..75d8069 100644
--- a/rtemstoolkit/options.py
+++ b/rtemstoolkit/options.py
@@ -273,9 +273,9 @@ class command_line(object):
return indent
def help(self):
- print '%s: [options] [args]' % (self.command_name)
- print 'RTEMS Tools Project (c) 2012-2015 Chris Johns'
- print 'Options and arguments:'
+ print('%s: [options] [args]' % (self.command_name))
+ print('RTEMS Tools Project (c) 2012-2015 Chris Johns')
+ print('Options and arguments:')
opts = self.long_opts_help.keys()
if self.optargs:
opts += self.optargs.keys()
@@ -287,7 +287,7 @@ class command_line(object):
h = self.optargs[o]
else:
raise error.general('invalid help data: %s' %(o))
- print '%-*s : %s' % (indent, o, h)
+ print('%-*s : %s' % (indent, o, h))
raise error.exit()
def process(self):
@@ -580,13 +580,13 @@ def run(args):
log.notice(str(opts))
log.notice('Defaults:')
log.notice(str(opts.defaults))
- except error.general, gerr:
- print gerr
+ except error.general as gerr:
+ print(gerr)
sys.exit(1)
- except error.internal, ierr:
- print ierr
+ except error.internal as ierr:
+ print(ierr)
sys.exit(1)
- except error.exit, eerr:
+ except error.exit:
pass
except KeyboardInterrupt:
_notice(opts, 'abort: user terminated')