From: Iustin Pop <[email protected]> These are all trivial changes.
Signed-off-by: Iustin Pop <[email protected]> --- lib/http/server.py | 9 ++++++--- src/Ganeti/Config.hs | 3 ++- test/py/ganeti.storage.bdev_unittest.py | 6 ++++-- test/py/ganeti.storage.gluster_unittest.py | 3 ++- 4 files changed, 14 insertions(+), 7 deletions(-) mode change 100644 => 100755 test/py/ganeti.storage.gluster_unittest.py diff --git a/lib/http/server.py b/lib/http/server.py index 8b3a4ee..ffdf790 100644 --- a/lib/http/server.py +++ b/lib/http/server.py @@ -423,7 +423,8 @@ class HttpServerRequestExecutor(object): try: http.Handshake(sock, self.WRITE_TIMEOUT) except http.HttpSessionHandshakeUnexpectedEOF: - logging.debug("Unexpected EOF from %s:%s" % (client_addr[0], client_addr[1])) + logging.debug("Unexpected EOF from %s:%s" % (client_addr[0], + client_addr[1])) # Ignore rest return @@ -609,8 +610,10 @@ class HttpServer(http.HttpBase, asyncore.dispatcher): t_setup = time.time() self.request_executor(self, self.handler, connection, client_addr) t_end = time.time() - logging.debug("Request from %s:%s executed in: %.4f [setup: %.4f] [workers: %d]" % ( - client_addr[0], client_addr[1], t_end - t_start, t_setup - t_start, len(self._children))) + logging.debug("Request from %s:%s executed in: %.4f" + " [setup: %.4f] [workers: %d]" % ( + client_addr[0], client_addr[1], t_end - t_start, + t_setup - t_start, len(self._children))) except Exception: # pylint: disable=W0703 logging.exception("Error while handling request from %s:%s", diff --git a/src/Ganeti/Config.hs b/src/Ganeti/Config.hs index 5a48316..9e11611 100644 --- a/src/Ganeti/Config.hs +++ b/src/Ganeti/Config.hs @@ -185,7 +185,8 @@ getNodeInstances cfg nname = sec_insts :: [Instance] sec_insts = [inst | (inst, disks) <- inst_disks, - s_uuid <- mapMaybe (\d -> (instPrimaryNode inst) >>= (computeDiskSecondaryNode d)) disks, + s_uuid <- mapMaybe (\d -> (instPrimaryNode inst) >>= + (computeDiskSecondaryNode d)) disks, s_uuid == nname] in (pri_inst, sec_insts) diff --git a/test/py/ganeti.storage.bdev_unittest.py b/test/py/ganeti.storage.bdev_unittest.py index a894e8f..80aa2af 100755 --- a/test/py/ganeti.storage.bdev_unittest.py +++ b/test/py/ganeti.storage.bdev_unittest.py @@ -328,9 +328,11 @@ class TestLogicalVolume(testutils.GanetiTestCase): vg_name="xenvg", size=3500000.00, free=5000000.00, attributes="wz--n-", lv_list=[])] - self.pv_info_no_space = [objects.LvmPvInfo(name="/dev/sda5", vg_name="xenvg", + self.pv_info_no_space = [objects.LvmPvInfo(name="/dev/sda5", + vg_name="xenvg", size=3500000.00, free=0.00, - attributes="wz--n-", lv_list=[])] + attributes="wz--n-", + lv_list=[])] def testParseLvInfoLine(self): diff --git a/test/py/ganeti.storage.gluster_unittest.py b/test/py/ganeti.storage.gluster_unittest.py old mode 100644 new mode 100755 index 8204885..291d825 --- a/test/py/ganeti.storage.gluster_unittest.py +++ b/test/py/ganeti.storage.gluster_unittest.py @@ -160,7 +160,8 @@ class TestGlusterStorage(testutils.GanetiTestCase): @testutils.patch_object(gluster.GlusterVolume, "Mount") @testutils.patch_object(ssconf.SimpleStore, "GetGlusterStorageDir") @testutils.patch_object(gluster.GlusterStorage, "Attach") - def testCreate(self, attach_mock, storage_dir_mock, mount_mock, create_file_mock): + def testCreate(self, attach_mock, storage_dir_mock, mount_mock, + create_file_mock): attach_mock.return_value = True storage_dir_mock.return_value = "/testmount" -- 2.8.1
