From 0e1e37a5a2bd5b717e11320b20773644b44502dd Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 29 Sep 2017 16:20:13 -0700 Subject: [PATCH] dictclient: remove overly complex dequote method --- plugins/Dict/local/dictclient.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/plugins/Dict/local/dictclient.py b/plugins/Dict/local/dictclient.py index a7e1f5798..04251250a 100644 --- a/plugins/Dict/local/dictclient.py +++ b/plugins/Dict/local/dictclient.py @@ -20,15 +20,10 @@ import socket, re version = '1.0' -def dequote(str): +def dequote(s): """Will remove single or double quotes from the start and end of a string and return the result.""" - quotechars = "'\"" - while len(str) and str[0] in quotechars: - str = str[1:] - while len(str) and str[-1] in quotechars: - str = str[0:-1] - return str + return s.strip("'\"") def enquote(str): """This function will put a string in double quotes, properly