mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-11-13 07:11:08 +01:00
Exceptions now store messages in self.msg directly.
Previously, they had a msg() method for fetching the error string. This has now been removed in favor of the directly callable attribute.
This commit is contained in:
parent
cf63af8819
commit
291761e6a4
2 changed files with 6 additions and 12 deletions
|
@ -32,12 +32,9 @@ DEFAULT_FORMAT = __available_formats__[2]
|
|||
__selected_format__ = DEFAULT_FORMAT
|
||||
|
||||
class InvalidFormatError(Exception):
|
||||
def __init__(self, message):
|
||||
super(InvalidFormatError, self).__init__(message)
|
||||
self.message = message
|
||||
|
||||
def msg(self):
|
||||
return self.message
|
||||
def __init__(self, msg):
|
||||
super(InvalidFormatError, self).__init__(msg)
|
||||
self.msg = msg
|
||||
|
||||
def select(format):
|
||||
global __selected_format__
|
||||
|
|
|
@ -20,12 +20,9 @@ from __future__ import unicode_literals
|
|||
import getopt
|
||||
|
||||
class InvalidOptionArgument(Exception):
|
||||
def __init__(self, message):
|
||||
super(InvalidOptionArgument, self).__init__(message)
|
||||
self.message = message
|
||||
|
||||
def msg(self):
|
||||
return self.message
|
||||
def __init__(self, msg):
|
||||
super(InvalidOptionArgument, self).__init__(msg)
|
||||
self.msg = msg
|
||||
|
||||
def __find_arg_in_options__(arg, options):
|
||||
for opt in options:
|
||||
|
|
Loading…
Reference in a new issue