mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-10-07 17:40:30 +00:00
Fix bug in ManifestError __str__ function
+ some formatting fixes
This commit is contained in:
parent
e1881da2bc
commit
039a35a344
2 changed files with 5 additions and 5 deletions
|
@ -62,5 +62,5 @@ class Manifest(object):
|
|||
self.validation_error(e.message, e.path)
|
||||
|
||||
def validation_error(self, message, json_path=None):
|
||||
from common.exceptions import ManifestError
|
||||
raise ManifestError(message, self.path, json_path)
|
||||
from common.exceptions import ManifestError
|
||||
raise ManifestError(message, self.path, json_path)
|
||||
|
|
|
@ -8,8 +8,8 @@ class ManifestError(Exception):
|
|||
|
||||
def __str__(self):
|
||||
if self.json_path is not None:
|
||||
path = '.'.join(self.json_path)
|
||||
return ('{msg}\n\tFile: {file}\n\tJSON path: {jsonpath}'
|
||||
path = '.'.join(map(str, self.json_path))
|
||||
return ('{msg}\n File path: {file}\n JSON path: {jsonpath}'
|
||||
.format(msg=self.message, file=self.manifest_path, jsonpath=path))
|
||||
return '{file}: {msg}'.format(msg=self.message, file=self.manifest_path)
|
||||
|
||||
|
@ -19,7 +19,7 @@ class TaskListError(Exception):
|
|||
self.message = message
|
||||
|
||||
def __str__(self):
|
||||
return "Error in tasklist: {0}".format(self.message)
|
||||
return 'Error in tasklist: {msg}'.format(msg=self.message)
|
||||
|
||||
|
||||
class TaskError(Exception):
|
||||
|
|
Loading…
Add table
Reference in a new issue