use str.format
authorSebastien Bourdeauducq <sb@m-labs.hk>
Fri, 3 Apr 2015 09:43:46 +0000 (17:43 +0800)
committerSebastien Bourdeauducq <sb@m-labs.hk>
Fri, 3 Apr 2015 09:43:46 +0000 (17:43 +0800)
make.py
misoclib/soc/__init__.py

diff --git a/make.py b/make.py
index bbd7ecf5483c0831d065eebea018fa6956722277..d417fa001ac38c065d04c388717ef12813cab44a 100755 (executable)
--- 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)
index 52e93dd8723024a84368e4568d857c90bcd74008..441ad5e4393b9fa6607ba2f79592b671d7251f94 100644 (file)
@@ -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)