Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
larbatch
python
ifdherror.py
Go to the documentation of this file.
1
#! /usr/bin/env python
2
######################################################################
3
#
4
# Name: ifdherror.py
5
#
6
# Purpose: Python class IFDHError (exception class). This class captures
7
# the error status related to ifdh commands that return nonzero
8
# exit statuses. This exception would normally be raised after
9
# any failed ifdh command.
10
#
11
# This class contains four data members.
12
#
13
# command - Ifdh command (string).
14
# status - Ifdh exit status.
15
# out - Ifdh standard output.
16
# err - Ifdh diagnostic output.
17
#
18
# Created: 4-Sep-2015 Herbert Greenlee
19
#
20
######################################################################
21
22
from
__future__
import
absolute_import
23
from
__future__
import
print_function
24
25
# Ifdh exception class.
26
27
class
IFDHError
(
Exception
):
28
29
def
__init__
(self, command, status, out, err):
30
31
# Store command as a single string.
32
# For compatibility with subprocess module, the command may be passed
33
# as a list of words.
34
35
self.
command
=
''
36
if
type
(command) ==
type
([]):
37
for
word
in
command:
38
self.
command
= self.
command
+
' '
+
str
(word)
39
else
:
40
self.
command
=
str
(command)
41
self.
status
=
int
(status)
42
self.
out
=
str
(out)
43
self.
err
=
str
(err)
44
return
45
46
def
__str__
(self):
47
s =
'\nCommand: %s\nStatus: %d\nOutput: %s\nError: %s\n'
% (
48
self.
command
, self.
status
, self.
out
, self.
err
)
49
return
s
50
51
python.ifdherror.IFDHError.command
command
Definition:
ifdherror.py:35
python.ifdherror.IFDHError.err
err
Definition:
ifdherror.py:43
type
Definition:
ShowerProducedPtrsHolder.hh:36
python.ifdherror.IFDHError
Definition:
ifdherror.py:27
keras_to_tensorflow.int
int
Definition:
keras_to_tensorflow.py:69
art::Exception
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition:
Exception.h:66
python.ifdherror.IFDHError.__str__
def __str__(self)
Definition:
ifdherror.py:46
python.ifdherror.IFDHError.out
out
Definition:
ifdherror.py:42
str
static QCString str
Definition:
fortrancode.cpp:27098
python.ifdherror.IFDHError.status
status
Definition:
ifdherror.py:41
python.ifdherror.IFDHError.__init__
def __init__(self, command, status, out, err)
Definition:
ifdherror.py:29
Generated by
1.8.11