self.msg = msg
def __str__(self):
- return self.keyword + repr(self.msg)
-
-class ConfigError(CreatorError):
- keyword = '<config>'
+ return self.keyword + str(self.msg)
class Usage(CreatorError):
keyword = '<usage>'
+ def __str__(self):
+ return self.keyword + str(self.msg) + ', please use "--help" for more info'
+
+class ConfigError(CreatorError):
+ keyword = '<config>'
+
class KsError(CreatorError):
keyword = '<kickstart>'
try:
mic = Mic()
sys.exit(mic.main())
+ except errors.Usage, usage:
+ msger.error(str(usage))
- except (errors.Usage, errors.ConfigError, errors.CreatorError) as err:
+ except errors.ConfigError, err:
if msger.get_loglevel() == 'debug':
import traceback
msger.error(traceback.format_exc())