#32: Fix for passing check_last as integer to subprocess when calling Borg.
This commit is contained in:
parent
8cbd51512b
commit
3967e1b5f0
4 changed files with 11 additions and 8 deletions
8
NEWS
8
NEWS
|
@ -1,7 +1,11 @@
|
||||||
|
1.1.2
|
||||||
|
|
||||||
|
* #32: Fix for passing check_last as integer to subprocess when calling Borg.
|
||||||
|
|
||||||
1.1.1
|
1.1.1
|
||||||
|
|
||||||
* #32: Fix for upgrade-borgmatic-config converting check_last option as a string instead of an
|
* Part of #32: Fix for upgrade-borgmatic-config converting check_last option as a string instead of
|
||||||
integer.
|
an integer.
|
||||||
* Fix for upgrade-borgmatic-config erroring when consistency checks option is not present.
|
* Fix for upgrade-borgmatic-config erroring when consistency checks option is not present.
|
||||||
|
|
||||||
1.1.0
|
1.1.0
|
||||||
|
|
|
@ -162,10 +162,9 @@ def _make_check_flags(checks, check_last=None):
|
||||||
|
|
||||||
('--repository-only',)
|
('--repository-only',)
|
||||||
|
|
||||||
Additionally, if a check_last value is given, a "--last" flag will be added. Note that only
|
Additionally, if a check_last value is given, a "--last" flag will be added.
|
||||||
Borg supports this flag.
|
|
||||||
'''
|
'''
|
||||||
last_flag = ('--last', check_last) if check_last else ()
|
last_flag = ('--last', str(check_last)) if check_last else ()
|
||||||
if checks == DEFAULT_CHECKS:
|
if checks == DEFAULT_CHECKS:
|
||||||
return last_flag
|
return last_flag
|
||||||
|
|
||||||
|
|
|
@ -409,13 +409,13 @@ def test_make_check_flags_with_default_checks_returns_no_flags():
|
||||||
def test_make_check_flags_with_checks_and_last_returns_flags_including_last():
|
def test_make_check_flags_with_checks_and_last_returns_flags_including_last():
|
||||||
flags = module._make_check_flags(('foo', 'bar'), check_last=3)
|
flags = module._make_check_flags(('foo', 'bar'), check_last=3)
|
||||||
|
|
||||||
assert flags == ('--foo-only', '--bar-only', '--last', 3)
|
assert flags == ('--foo-only', '--bar-only', '--last', '3')
|
||||||
|
|
||||||
|
|
||||||
def test_make_check_flags_with_last_returns_last_flag():
|
def test_make_check_flags_with_last_returns_last_flag():
|
||||||
flags = module._make_check_flags(module.DEFAULT_CHECKS, check_last=3)
|
flags = module._make_check_flags(module.DEFAULT_CHECKS, check_last=3)
|
||||||
|
|
||||||
assert flags == ('--last', 3)
|
assert flags == ('--last', '3')
|
||||||
|
|
||||||
|
|
||||||
def test_check_archives_should_call_borg_with_parameters():
|
def test_check_archives_should_call_borg_with_parameters():
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -1,7 +1,7 @@
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
|
|
||||||
VERSION = '1.1.1'
|
VERSION = '1.1.2'
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
|
|
Loading…
Reference in a new issue