3 # Copyright (c) 2007 Red Hat, Inc.
4 # Copyright (c) 2011 Intel, Inc.
6 # This program is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by the Free
8 # Software Foundation; version 2 of the License
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 # You should have received a copy of the GNU General Public License along
16 # with this program; if not, write to the Free Software Foundation, Inc., 59
17 # Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 class CreatorError(Exception):
20 """An exception base class for all imgcreate errors."""
23 def __init__(self, msg):
27 return self.keyword + str(self.msg)
29 class Usage(CreatorError):
33 return self.keyword + str(self.msg) + ', please use "--help" for more info'
35 class Abort(CreatorError):
38 class ConfigError(CreatorError):
41 class KsError(CreatorError):
42 keyword = '<kickstart>'
44 class MountError(CreatorError):
47 class SnapshotError(CreatorError):
48 keyword = '<snapshot>'
50 class SquashfsError(CreatorError):
51 keyword = '<squashfs>'