components/openstack/swift/patches/manager.patch
changeset 6853 cf1567491b1b
parent 5448 56f4540f741d
equal deleted inserted replaced
6852:bf55de364b19 6853:cf1567491b1b
     3 "executable" keyword argument to subprocess.Popen() (and allow for it to be
     3 "executable" keyword argument to subprocess.Popen() (and allow for it to be
     4 mocked out during testing).
     4 mocked out during testing).
     5 
     5 
     6 This patch is not suitable for pushing upstream.
     6 This patch is not suitable for pushing upstream.
     7 
     7 
     8 --- swift-2.3.0/swift/common/manager.py.~1~	2015-04-30 06:57:49.000000000 -0700
     8 --- swift-2.7.0/swift/common/manager.py.~1~	2016-03-25 02:42:55.000000000 -0700
     9 +++ swift-2.3.0/swift/common/manager.py	2016-02-08 00:46:36.615826872 -0800
     9 +++ swift-2.7.0/swift/common/manager.py	2016-08-08 18:50:52.318623880 -0700
    10 @@ -577,7 +577,8 @@ class Server(object):
    10 @@ -655,7 +655,8 @@ class Server(object):
    11                  re_out = subprocess.PIPE
    11                  re_out = subprocess.PIPE
    12              else:
    12              else:
    13                  re_out = open(os.devnull, 'w+b')
    13                  re_out = open(os.devnull, 'w+b')
    14 -        proc = subprocess.Popen(args, stdout=re_out, stderr=re_err)
    14 -        proc = subprocess.Popen(args, stdout=re_out, stderr=re_err)
    15 +        proc = subprocess.Popen(args, stdout=re_out, stderr=re_err,
    15 +        proc = subprocess.Popen(args, stdout=re_out, stderr=re_err,
    16 +                                executable='/usr/lib/swift/' + self.cmd)
    16 +                                executable='/usr/lib/swift/' + self.cmd)
    17          pid_file = self.get_pid_file_name(conf_file)
    17          pid_file = self.get_pid_file_name(conf_file)
    18          write_file(pid_file, proc.pid)
    18          write_file(pid_file, proc.pid)
    19          self.procs.append(proc)
    19          self.procs.append(proc)
    20 --- swift-2.3.0/test/unit/common/test_manager.py.~1~	2015-04-30 06:57:49.000000000 -0700
    20 --- swift-2.7.0/test/unit/common/test_manager.py.~1~	2016-03-25 02:42:55.000000000 -0700
    21 +++ swift-2.3.0/test/unit/common/test_manager.py	2016-02-08 00:45:32.431081803 -0800
    21 +++ swift-2.7.0/test/unit/common/test_manager.py	2016-08-08 18:50:52.320000055 -0700
    22 @@ -955,7 +955,7 @@ class TestServer(unittest.TestCase):
    22 @@ -1054,7 +1054,7 @@ class TestServer(unittest.TestCase):
    23          class MockProc(object):
    23          class MockProc(object):
    24  
    24  
    25              def __init__(self, pid, args, stdout=MockProcess.NOTHING,
    25              def __init__(self, pid, args, stdout=MockProcess.NOTHING,
    26 -                         stderr=MockProcess.NOTHING):
    26 -                         stderr=MockProcess.NOTHING):
    27 +                         stderr=MockProcess.NOTHING, executable=None):
    27 +                         stderr=MockProcess.NOTHING, executable=None):