summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-08 17:53:42 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-08 17:53:42 -0700
commit5767a1d20ee49137f51b033e09cf2a754b57ef71 (patch)
tree49d231f45354ee634fc38c13007a8094d01a6cda /cloudinit
parentc29abc03def42008c22df2f43fca3e43f62e3adb (diff)
downloadvyos-cloud-init-5767a1d20ee49137f51b033e09cf2a754b57ef71.tar.gz
vyos-cloud-init-5767a1d20ee49137f51b033e09cf2a754b57ef71.zip
Moving exceptions to modules where they are used. Seems to make sense.
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/exceptions.py62
1 files changed, 0 insertions, 62 deletions
diff --git a/cloudinit/exceptions.py b/cloudinit/exceptions.py
deleted file mode 100644
index 235ded7a..00000000
--- a/cloudinit/exceptions.py
+++ /dev/null
@@ -1,62 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-
-class ProcessExecutionError(IOError):
-
- message_tmpl = ('%(description)s\nCommand: %(cmd)s\n'
- 'Exit code: %(exit_code)s\nStdout: %(stdout)r\n'
- 'Stderr: %(stderr)r')
-
- def __init__(self, stdout=None, stderr=None,
- exit_code=None, cmd=None,
- description=None, reason=None):
- if not cmd:
- self.cmd = '-'
- else:
- self.cmd = cmd
-
- if not description:
- self.description = 'Unexpected error while running command.'
- else:
- self.description = description
-
- if not isinstance(exit_code, (long, int)):
- self.exit_code = '-'
- else:
- self.exit_code = exit_code
-
- if not stderr:
- self.stderr = ''
- else:
- self.stderr = stderr
-
- if not stdout:
- self.stdout = ''
- else:
- self.stdout = stdout
-
- message = self.message_tmpl % {
- 'description': self.description,
- 'cmd': self.cmd,
- 'exit_code': self.exit_code,
- 'stdout': self.stdout,
- 'stderr': self.stderr,
- }
- IOError.__init__(self, message)
- self.reason = reason
-
-
-class MountFailedError(Exception):
- pass
-
-
-class StackExceeded(Exception):
- pass
-
-
-class RecursiveInclude(Exception):
- pass
-
-
-class DataSourceNotFoundException(Exception):
- pass