From: Sebastien Bourdeauducq Date: Fri, 3 Apr 2015 09:43:46 +0000 (+0800) Subject: use str.format X-Git-Tag: 24jan2021_ls180~2398 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=85b3cced22505397124bbdf5ec89096cf04c8573;p=litex.git use str.format --- 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)