summaryrefslogtreecommitdiff
path: root/libc/malloc_hooks/tests/malloc_hooks_tests.cpp
diff options
context:
space:
mode:
authorDaniel Mentz <danielmentz@google.com>2019-04-04 11:51:29 -0700
committerDaniel Mentz <danielmentz@google.com>2019-04-16 14:26:02 -0700
commit5ca5d4aa1d66b16110c1476f3311abafa7afd26e (patch)
tree4437089c492804ee06c482b471716edbaf168e32 /libc/malloc_hooks/tests/malloc_hooks_tests.cpp
parentc8c4babc33a84dabba513d4b7243f1dd3d2ea443 (diff)
clean_header: Fix error handling for no-such-file case
The function cleanupFile should always return a single value (as opposed to a tuple or list). In addition, if it encounters an error, it is expected to return a value that evaluates to False. As it stands, however, it returns (None, None) in certain error cases. Change this function to return None, in those cases. We previously saw the following error message, when we tried to run clean_header.py on a non-existent file. Traceback (most recent call last): File "clean_header.py", line 208, in <module> b.updateGitFiles() File "utils.py", line 164, in updateGitFiles self._writeFile(dst) File "utils.py", line 136, in _writeFile f.write(self.new_data[dst]) TypeError: expected a string or other character buffer object (cherry picked from commit 6d6b4cedd16c3b4d6de114c622739fc5d52f4c57) Bug: 128420573 Change-Id: Id1dfab71e7efdee14950520df69f2e35219ee353 Merged-In: I5f717dd1a4388f598f0fd4bfd5e6129017de9095
Diffstat (limited to 'libc/malloc_hooks/tests/malloc_hooks_tests.cpp')
0 files changed, 0 insertions, 0 deletions