From 2812569593e6f118e36052a9b40dadcaa88840ad Mon Sep 17 00:00:00 2001 From: Fletcher Boyd Date: Thu, 5 Sep 2013 09:03:01 +0800 Subject: [PATCH] .format --- plugins/minecraft_ping.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/minecraft_ping.py b/plugins/minecraft_ping.py index a4ae0e2..63b56f4 100644 --- a/plugins/minecraft_ping.py +++ b/plugins/minecraft_ping.py @@ -50,8 +50,7 @@ def mcping_connect(host, port): return message except: - return "Error pinging " + host + ":" + str(port) + \ - ", is it up? Double-check your address!" + return "Error pinging {}:{}, is it up? Double-check your address!".format(host,str(port)) def srvData(domain): @@ -91,8 +90,8 @@ def mcping(inp): port = int(getdata[0]) return format_motd(mcping_connect(host, port)) except: - return "Error pinging %s, is it up? Double-check your address!" % inp + return "Error pinging {}, is it up? Double-check your address!".format(inp) else: - return "Error pinging %s, is it up? Double-check your address!" % inp + return "Error pinging {}, is it up? Double-check your address!".format(inp) else: return rdata