Merge "Make lock_wrapper private"
This commit is contained in:
commit
7f4a3bd016
@ -333,7 +333,7 @@ def synchronized_with_prefix(lock_file_prefix):
|
||||
return functools.partial(synchronized, lock_file_prefix=lock_file_prefix)
|
||||
|
||||
|
||||
def lock_wrapper(argv):
|
||||
def _lock_wrapper(argv):
|
||||
"""Create a dir for locks and pass it to command from arguments
|
||||
|
||||
This is exposed as a console script entry point named
|
||||
@ -357,4 +357,4 @@ def lock_wrapper(argv):
|
||||
|
||||
|
||||
def main():
|
||||
sys.exit(lock_wrapper(sys.argv))
|
||||
sys.exit(_lock_wrapper(sys.argv))
|
||||
|
@ -495,7 +495,7 @@ class LockutilsModuleTestCase(test_base.BaseTestCase):
|
||||
'assert os.path.isdir(lock_path)',
|
||||
])
|
||||
argv = ['', sys.executable, '-c', script]
|
||||
retval = lockutils.lock_wrapper(argv)
|
||||
retval = lockutils._lock_wrapper(argv)
|
||||
self.assertEqual(retval, 0, "Bad OSLO_LOCK_PATH has been set")
|
||||
|
||||
def test_return_value_maintained(self):
|
||||
@ -504,7 +504,7 @@ class LockutilsModuleTestCase(test_base.BaseTestCase):
|
||||
'sys.exit(1)',
|
||||
])
|
||||
argv = ['', sys.executable, '-c', script]
|
||||
retval = lockutils.lock_wrapper(argv)
|
||||
retval = lockutils._lock_wrapper(argv)
|
||||
self.assertEqual(retval, 1)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user