mirror of https://github.com/borgbackup/borg.git
Fix typo preventing the security confirmation prompt from working
Closes #303
This commit is contained in:
parent
c79b5357f8
commit
a24d0f4cba
1
CHANGES
1
CHANGES
|
@ -7,6 +7,7 @@ Version 0.16
|
|||
------------
|
||||
|
||||
(bugfix release, released on X)
|
||||
- Fix typo preventing the security confirmation prompt from working (#303)
|
||||
- Improve handling of systems with improperly configured file system encoding (#289)
|
||||
- Fix "All archives" output for attic info. (#183)
|
||||
- More user friendly error message when repository key file is not found (#236)
|
||||
|
|
|
@ -68,7 +68,7 @@ class Cache(object):
|
|||
if env_var_override and os.environ.get(env_var_override):
|
||||
print("Yes (From {})".format(env_var_override))
|
||||
return True
|
||||
if sys.stdin.isatty():
|
||||
if not sys.stdin.isatty():
|
||||
return False
|
||||
try:
|
||||
answer = input('Do you want to continue? [yN] ')
|
||||
|
|
|
@ -106,18 +106,19 @@ class ArchiverTestCaseBase(AtticTestCase):
|
|||
self.assert_equal(exit_code, ret)
|
||||
return output
|
||||
args = list(args)
|
||||
stdout, stderr = sys.stdout, sys.stderr
|
||||
stdin, stdout, stderr = sys.stdin, sys.stdout, sys.stderr
|
||||
try:
|
||||
sys.stdin = StringIO()
|
||||
output = StringIO()
|
||||
sys.stdout = sys.stderr = output
|
||||
ret = self.archiver.run(args)
|
||||
sys.stdout, sys.stderr = stdout, stderr
|
||||
sys.stdin, sys.stdout, sys.stderr = stdin, stdout, stderr
|
||||
if ret != exit_code:
|
||||
print(output.getvalue())
|
||||
self.assert_equal(exit_code, ret)
|
||||
return output.getvalue()
|
||||
finally:
|
||||
sys.stdout, sys.stderr = stdout, stderr
|
||||
sys.stdin, sys.stdout, sys.stderr = stdin, stdout, stderr
|
||||
|
||||
def create_src_archive(self, name):
|
||||
self.attic('create', self.repository_location + '::' + name, src_dir)
|
||||
|
|
Loading…
Reference in New Issue