Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
larbatch
python
jobsuberror.py
Go to the documentation of this file.
1
#! /usr/bin/env python
2
######################################################################
3
#
4
# Name: jobsuberror.py
5
#
6
# Purpose: Python class JobsubError (exception class). This class captures
7
# the error status related to jobsub commands that return nonzero
8
# exit statuses. This exception would normally be raised after
9
# any failed jobsub command.
10
#
11
# This class contains four data members.
12
#
13
# command - Jobsub command (string).
14
# status - Jobsub exit status.
15
# out - Jobsub standard output.
16
# err - Jobsub diagnostic output.
17
#
18
# Created: 20-May-2015 Herbert Greenlee
19
#
20
######################################################################
21
22
from
__future__
import
absolute_import
23
from
__future__
import
print_function
24
25
# Jobsub exception class.
26
27
class
JobsubError
(
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.jobsuberror.JobsubError.status
status
Definition:
jobsuberror.py:41
type
Definition:
ShowerProducedPtrsHolder.hh:36
python.jobsuberror.JobsubError.__init__
def __init__(self, command, status, out, err)
Definition:
jobsuberror.py:29
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.jobsuberror.JobsubError.err
err
Definition:
jobsuberror.py:43
python.jobsuberror.JobsubError.command
command
Definition:
jobsuberror.py:35
python.jobsuberror.JobsubError.out
out
Definition:
jobsuberror.py:42
python.jobsuberror.JobsubError.__str__
def __str__(self)
Definition:
jobsuberror.py:46
python.jobsuberror.JobsubError
Definition:
jobsuberror.py:27
str
static QCString str
Definition:
fortrancode.cpp:27098
Generated by
1.8.11