clean up ending whitespaces
This commit is contained in:
parent
2f15dc945b
commit
d797c16cb4
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
from core import debug
|
from core import debug
|
||||||
from utils import line_utils
|
from utils import line_utils
|
||||||
import string, time
|
import string, time, re
|
||||||
|
|
||||||
class outputManager():
|
class outputManager():
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -92,11 +92,12 @@ class outputManager():
|
|||||||
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
text = self.env['runtime']['headLineManager'].replaceHeadLines(text)
|
cleanText = text.replace('\n',' , ')
|
||||||
text = self.env['runtime']['punctuationManager'].proceedPunctuation(text,ignorePunctuation)
|
cleanText = re.sub(' +$',' ', cleanText)
|
||||||
text = text.replace('\n',' , ')
|
cleanText = self.env['runtime']['headLineManager'].replaceHeadLines(cleanText)
|
||||||
self.env['runtime']['speechDriver'].speak(text)
|
cleanText = self.env['runtime']['punctuationManager'].proceedPunctuation(cleanText, ignorePunctuation)
|
||||||
self.env['runtime']['debug'].writeDebugOut("Speak: "+ text,debug.debugLevel.INFO)
|
self.env['runtime']['speechDriver'].speak(cleanText)
|
||||||
|
self.env['runtime']['debug'].writeDebugOut("Speak: "+ cleanText,debug.debugLevel.INFO)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.env['runtime']['debug'].writeDebugOut("\"speak\" in outputManager.speakText ",debug.debugLevel.ERROR)
|
self.env['runtime']['debug'].writeDebugOut("\"speak\" in outputManager.speakText ",debug.debugLevel.ERROR)
|
||||||
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
||||||
|
Loading…
Reference in New Issue
Block a user