summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTim Laszlo <tim.laszlo@gmail.com>2010-06-11 03:42:50 +0000
committerSol Jerome <sol.jerome@gmail.com>2010-06-11 08:17:40 -0500
commit9d002d521ea470ad58b48c0ad8dfb24e1b358520 (patch)
treedc78c40e870f97e6550f60a89a5a37e678f91a98 /src
parentc931eac86823787342f65386b950ef360f42ab32 (diff)
downloadbcfg2-9d002d521ea470ad58b48c0ad8dfb24e1b358520.tar.gz
bcfg2-9d002d521ea470ad58b48c0ad8dfb24e1b358520.tar.bz2
bcfg2-9d002d521ea470ad58b48c0ad8dfb24e1b358520.zip
Prevent Logger.py from throwing execptions when unable to connect to the logger
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5924 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Logger.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/Logger.py b/src/lib/Logger.py
index 5616d7469..e8cdd492d 100644
--- a/src/lib/Logger.py
+++ b/src/lib/Logger.py
@@ -134,8 +134,15 @@ class FragmentingSysLogHandler(logging.handlers.SysLogHandler):
break
except socket.error:
continue
- self.socket.send("Reconnected to syslog")
- self.socket.send(msg)
+ try:
+ self.socket.send("Reconnected to syslog")
+ self.socket.send(msg)
+ except:
+ """
+ If we still fail then drop it. Running bcfg2-server as non-root can
+ trigger permission denied exceptions.
+ """
+ pass
def setup_logging(procname, to_console=True, to_syslog=True, syslog_facility='daemon', level=0, to_file=None):
"""Setup logging for Bcfg2 software."""