Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logging functionality to InteractiveScriptTemplate.py.template #2282

Merged
merged 9 commits into from
Feb 14, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ import time
sys.path.insert( 0, '###GANGA_PYTHONPATH###' )

statfileName = os.path.join( '###OUTPUTDIR###', '__jobstatus__' )
logfile = os.path.join('###OUTPUTDIR###', 'interactive_log.txt')

try:
statfile = open(statfileName, 'w')
samadpls marked this conversation as resolved.
Show resolved Hide resolved
logfile = open(logfile, 'w')
except IOError as x:
print('ERROR: Unable to write status file or log file.')
print('ERROR: ', x)
raise
finally:
statfile.close()
samadpls marked this conversation as resolved.
Show resolved Hide resolved
try:
statfile = open( statfileName, 'w' )
except IOError as x:
Expand Down