| OLD | NEW |
| 1 # Copyright 2017 The Chromium Authors. All rights reserved. | 1 # Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 """Methods for converting model objects to human-readable formats.""" | 4 """Methods for converting model objects to human-readable formats.""" |
| 5 | 5 |
| 6 import datetime | 6 import datetime |
| 7 import itertools | 7 import itertools |
| 8 import time | 8 import time |
| 9 | 9 |
| 10 import models | 10 import models |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 277 |
| 278 def GenerateLines(obj, verbose=False, recursive=False): | 278 def GenerateLines(obj, verbose=False, recursive=False): |
| 279 """Returns an iterable of lines (without \n) that describes |obj|.""" | 279 """Returns an iterable of lines (without \n) that describes |obj|.""" |
| 280 return Describer(verbose=verbose, recursive=recursive).GenerateLines(obj) | 280 return Describer(verbose=verbose, recursive=recursive).GenerateLines(obj) |
| 281 | 281 |
| 282 | 282 |
| 283 def WriteLines(lines, func): | 283 def WriteLines(lines, func): |
| 284 for l in lines: | 284 for l in lines: |
| 285 func(l) | 285 func(l) |
| 286 func('\n') | 286 func('\n') |
| OLD | NEW |