| OLD | NEW |
| 1 # Copyright (c) 2016 Google Inc. All rights reserved. | 1 # Copyright (c) 2016 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 143 |
| 144 def error(self, msg): | 144 def error(self, msg): |
| 145 self.print_usage(sys.stderr) | 145 self.print_usage(sys.stderr) |
| 146 error_message = "%s: error: %s\n" % (self.get_prog_name(), msg) | 146 error_message = "%s: error: %s\n" % (self.get_prog_name(), msg) |
| 147 # This method is overridden to add this one line to the output: | 147 # This method is overridden to add this one line to the output: |
| 148 error_message += "\nType \"%s --help\" to see usage.\n" % self.get_prog_
name() | 148 error_message += "\nType \"%s --help\" to see usage.\n" % self.get_prog_
name() |
| 149 self.exit(1, error_message) | 149 self.exit(1, error_message) |
| 150 | 150 |
| 151 # We override format_epilog to avoid the default formatting which would para
graph-wrap the epilog | 151 # We override format_epilog to avoid the default formatting which would para
graph-wrap the epilog |
| 152 # and also to allow us to compute the epilog lazily instead of in the constr
uctor (allowing it to be context sensitive). | 152 # and also to allow us to compute the epilog lazily instead of in the constr
uctor (allowing it to be context sensitive). |
| 153 def format_epilog(self, epilog): | 153 def format_epilog(self, epilog): # pylint: disable=unused-argument |
| 154 if self.epilog_method: | 154 if self.epilog_method: |
| 155 return "\n%s\n" % self.epilog_method() | 155 return "\n%s\n" % self.epilog_method() |
| 156 return "" | 156 return "" |
| OLD | NEW |