Skip to content

Commit 3ffff0b

Browse files
committed
make sure name is outside try block (NO_JIRA)
1 parent d8d9e47 commit 3ffff0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main/githooks.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,9 @@ class TestTrimTrailingWhitespace(unittest.TestCase):
461461
def test_trim_trailing_whitespace(self):
462462
content = 'first line\nsecond line \nthird line '
463463
trimmed_content = 'first line\nsecond line\nthird line'
464-
464+
465+
name = NamedTemporaryFile().name
465466
try:
466-
name = NamedTemporaryFile().name
467467
Path(name).write_text(content)
468468
# Trailing whitespace found
469469
retval = trim_trailing_whitespace_in_file(name, True, True)

0 commit comments

Comments
 (0)