diff options
| author | 2021-08-19 12:31:08 +0000 | |
|---|---|---|
| committer | 2021-08-19 12:31:08 +0000 | |
| commit | 3d05e54f107e1bffd5433ff1faeddf36f077ee9a (patch) | |
| tree | 2cf13394851526c1fac0dd36ce122bdfd128347e | |
| parent | bd7a74ab9c32cc34e75a88a958de9874f42f0a82 (diff) | |
| parent | fa692af71485e019b3d9ed91884e94e9f9f33d95 (diff) | |
Merge "Revert "Apply pylint to cc/symbolfile"" am: 9ab1e685ee am: 242d45b1fa am: 6acdef085e am: fa692af714
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1801789
Change-Id: I3e587c5dd7b5be63ca9720e053a3a871ad3b987f
| -rw-r--r-- | cc/symbolfile/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cc/symbolfile/__init__.py b/cc/symbolfile/__init__.py index f8d18414c..31c444385 100644 --- a/cc/symbolfile/__init__.py +++ b/cc/symbolfile/__init__.py @@ -329,7 +329,7 @@ class SymbolFileParser: def parse(self) -> List[Version]: """Parses the symbol file and returns a list of Version objects.""" versions = [] - while self.next_line(): + while self.next_line() != '': assert self.current_line is not None if '{' in self.current_line: versions.append(self.parse_version()) @@ -376,7 +376,7 @@ class SymbolFileParser: symbols: List[Symbol] = [] global_scope = True cpp_symbols = False - while self.next_line(): + while self.next_line() != '': if '}' in self.current_line: # Line is something like '} BASE; # tags'. Both base and tags # are optional here. @@ -428,11 +428,11 @@ class SymbolFileParser: A return value of '' indicates EOF. """ line = self.input_file.readline() - while not line.strip() or line.strip().startswith('#'): + while line.strip() == '' or line.strip().startswith('#'): line = self.input_file.readline() # We want to skip empty lines, but '' indicates EOF. - if not line: + if line == '': break self.current_line = line return self.current_line |