Skip to content

Commit

Permalink
Don't output empty line after each error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
sobomax committed Dec 6, 2023
1 parent 4ed0fbb commit 0f5f772
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion samples/ivr_plugins/Callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def run(self):
callbacks_lock.release()
except:
for msg in traceback.format_exception(*sys.exc_info()):
vapp.logger.error(msg)
vapp.logger.error(msg.rstrip())
time.sleep(5)

class Plugin(vapp.BasePlugin):
Expand Down
2 changes: 1 addition & 1 deletion samples/sample-ivrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ def daemonize():
pass
except:
for msg in traceback.format_exception(*sys.exc_info()):
logger.error(msg)
logger.error(msg.rstrip())
logger.error("Unrecoverable error. Exiting...")
sys.exit(1)
2 changes: 1 addition & 1 deletion vapp/Agi.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def handle(self):
except:
if (vapp.logger != None):
for msg in traceback.format_exception(*sys.exc_info()):
vapp.logger.error(msg)
vapp.logger.error(msg.rstrip())

def runSession(self):
raise NotImplementedError()
Expand Down
4 changes: 2 additions & 2 deletions vapp/AsteriskManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def run(self):
self.__sock = None # force reconnect
if (self.__logger):
for msg in traceback.format_exception(*sys.exc_info()):
self.__logger.error(msg)
self.__logger.error(msg.rstrip())

try:
tmp.close()
Expand Down Expand Up @@ -484,7 +484,7 @@ def registerChannel(self, listener):
except:
if (self.__logger):
for msg in traceback.format_exception(*sys.exc_info()):
self.__logger.error(msg)
self.__logger.error(msg.rstrip())
self.__chan_lock.release()

def unregisterChannel(self, listener):
Expand Down
4 changes: 2 additions & 2 deletions vapp/PluginHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def loadPlugins(plugin_packages, exclude_modules = []):
mod = __import__(full_name, fromlist = [''])
except:
for msg in traceback.format_exception(*sys.exc_info()):
_logger.error(msg)
_logger.error(msg.rstrip())
sys.exit(1)

try:
Expand Down Expand Up @@ -174,7 +174,7 @@ def handleCall(self):
self.error("BAD PROMPT. Trace dumped into %s" % e.dumpFileName())
except:
for msg in traceback.format_exception(*sys.exc_info()):
self.error(msg)
self.error(msg.rstrip())

def cleanup(self):
"""
Expand Down

0 comments on commit 0f5f772

Please sign in to comment.