From a8e523cc11ffa5380f6d3c8c08c7eb47c7612b98 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 3 Aug 2017 10:03:00 -0400 Subject: [PATCH] Gracefully disable localsession without fcntl Windows does not have fcntl, but can work out of band. Allow out of band on Windows to work even though localsession cannot. Change-Id: Ia3c188b33582f2c62bef6cb1f9576ccec314506d --- pyghmi/ipmi/command.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index 5788c653..75a60dbc 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -28,7 +28,10 @@ try: from pyghmi.ipmi.private import session except ImportError: session = None -from pyghmi.ipmi.private import localsession +try: + from pyghmi.ipmi.private import localsession +except ImportError: + localsession = None import pyghmi.ipmi.private.util as pygutil import pyghmi.ipmi.sdr as sdr import socket