[PATCH phosphor-rest-server 1/5] Remove unused system bus connection
OpenBMC Patches
patches at stwcx.xyz
Thu Nov 5 03:38:58 AEDT 2015
From: Brad Bishop <bradleyb at us.ibm.com>
---
phosphor-rest | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/phosphor-rest b/phosphor-rest
index 600b3d5..b0aee59 100644
--- a/phosphor-rest
+++ b/phosphor-rest
@@ -328,9 +328,9 @@ class DBusRestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
return self.do_command()
class HTTPServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer):
- def __init__(self, bind, handler):
+ def __init__(self, bind, handler, bus):
BaseHTTPServer.HTTPServer.__init__(self, bind, handler)
- self.bus = dbus.SystemBus()
+ self.bus = bus
mapper = self.bus.get_object(OpenBMCMapper.MAPPER_NAME,
OpenBMCMapper.MAPPER_PATH)
self.mapper = dbus.Interface(mapper,
@@ -338,5 +338,5 @@ class HTTPServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer):
if __name__ == '__main__':
bus = dbus.SystemBus()
- server = HTTPServer(('', 80), DBusRestHandler)
+ server = HTTPServer(('', 80), DBusRestHandler, bus)
server.serve_forever()
--
2.6.0
More information about the openbmc
mailing list