From 85b3cced22505397124bbdf5ec89096cf04c8573 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 3 Apr 2015 17:43:46 +0800 Subject: [PATCH] use str.format --- make.py | 2 +- misoclib/soc/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/make.py b/make.py index bbd7ecf5..d417fa00 100755 --- a/make.py +++ b/make.py @@ -96,7 +96,7 @@ if __name__ == "__main__": if action in actions: actions[action] = True else: - print("Unknown action: "+action+". Valid actions are:") + print("Unknown action: {}. Valid actions are:".format(action)) for a in action_list: print(" "+a) sys.exit(1) diff --git a/misoclib/soc/__init__.py b/misoclib/soc/__init__.py index 52e93dd8..441ad5e4 100644 --- a/misoclib/soc/__init__.py +++ b/misoclib/soc/__init__.py @@ -74,7 +74,7 @@ class SoC(Module): elif cpu_type == "or1k": self.add_cpu_or_bridge(mor1kx.MOR1KX(platform, self.cpu_reset_address)) else: - raise ValueError("Unsupported CPU type: "+cpu_type) + raise ValueError("Unsupported CPU type: {}".format(cpu_type)) self.add_wb_master(self.cpu_or_bridge.ibus) self.add_wb_master(self.cpu_or_bridge.dbus) -- 2.30.2