diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-08-24 14:28:08 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-08-24 14:28:08 +0000 |
commit | a5992cd38b9d3717338c3339df497a0b1427a549 (patch) | |
tree | f273a7d23a7ea3165a92c72d797ed9c7182fd52c /src | |
parent | 10b302bf3d7fd96999d98c886286cd14ba1d62ff (diff) | |
download | bcfg2-a5992cd38b9d3717338c3339df497a0b1427a549.tar.gz bcfg2-a5992cd38b9d3717338c3339df497a0b1427a549.tar.bz2 bcfg2-a5992cd38b9d3717338c3339df497a0b1427a549.zip |
Fix syslog reconnect code to properly choose socket type (for nexenta)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2105 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Logging.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Logging.py b/src/lib/Logging.py index 0b59e8d25..3d77bdb97 100644 --- a/src/lib/Logging.py +++ b/src/lib/Logging.py @@ -114,7 +114,10 @@ class FragmentingSysLogHandler(logging.handlers.SysLogHandler): except socket.error: while True: try: - self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) + if isinstance(self.address, types.TupleType): + self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + else: + self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) self.socket.connect(self.address) break except socket.error: |