##// END OF EJS Templates
Fixed blank response handling
Jonathan Frederic -
Show More
@@ -176,15 +176,15 b' class SphinxTransformer(ActivatableTransformer):'
176 response = response.strip().lower()
176 response = response.strip().lower()
177
177
178 #Catch 1, true, yes as True
178 #Catch 1, true, yes as True
179 if (response == "1" or response[0] == "t" or response[0] == "y"):
179 if len(response) > 0 and (response == "1" or response[0] == "t" or response[0] == "y"):
180 return True
180 return True
181
181
182 #Catch 0, false, no as False
182 #Catch 0, false, no as False
183 elif (response == "0" or response[0] == "f" or response[0] == "n"):
183 elif len(response) > 0 and (response == "0" or response[0] == "f" or response[0] == "n"):
184 return False
184 return False
185
185
186 else:
186 else:
187 return Default
187 return default
188
188
189 def _prompt_output_style(self):
189 def _prompt_output_style(self):
190
190
General Comments 0
You need to be logged in to leave comments. Login now