mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-09-27 18:01:30 +02: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
@ -32,12 +32,9 @@ DEFAULT_FORMAT = __available_formats__[2]
|
|||||||
__selected_format__ = DEFAULT_FORMAT
|
__selected_format__ = DEFAULT_FORMAT
|
||||||
|
|
||||||
class InvalidFormatError(Exception):
|
class InvalidFormatError(Exception):
|
||||||
def __init__(self, message):
|
def __init__(self, msg):
|
||||||
super(InvalidFormatError, self).__init__(message)
|
super(InvalidFormatError, self).__init__(msg)
|
||||||
self.message = message
|
self.msg = msg
|
||||||
|
|
||||||
def msg(self):
|
|
||||||
return self.message
|
|
||||||
|
|
||||||
def select(format):
|
def select(format):
|
||||||
global __selected_format__
|
global __selected_format__
|
||||||
|
@ -20,12 +20,9 @@ from __future__ import unicode_literals
|
|||||||
import getopt
|
import getopt
|
||||||
|
|
||||||
class InvalidOptionArgument(Exception):
|
class InvalidOptionArgument(Exception):
|
||||||
def __init__(self, message):
|
def __init__(self, msg):
|
||||||
super(InvalidOptionArgument, self).__init__(message)
|
super(InvalidOptionArgument, self).__init__(msg)
|
||||||
self.message = message
|
self.msg = msg
|
||||||
|
|
||||||
def msg(self):
|
|
||||||
return self.message
|
|
||||||
|
|
||||||
def __find_arg_in_options__(arg, options):
|
def __find_arg_in_options__(arg, options):
|
||||||
for opt in options:
|
for opt in options:
|
||||||
|
Loading…
Reference in New Issue
Block a user