diff --git a/CHANGES b/CHANGES index 5828de634..7b312a69a 100644 --- a/CHANGES +++ b/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) diff --git a/attic/cache.py b/attic/cache.py index 95017b61b..8a38d0f9a 100644 --- a/attic/cache.py +++ b/attic/cache.py @@ -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] ') diff --git a/attic/testsuite/archiver.py b/attic/testsuite/archiver.py index c115b460f..372a1e052 100644 --- a/attic/testsuite/archiver.py +++ b/attic/testsuite/archiver.py @@ -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)