#! /usr/bin/env python3
# -*- coding: utf-8 -*-
-# Copyright (C) 2017-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2017-2021 CEA/DEN, EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
JOB_FILE_NAME = "jobDump.xml"
-class Job(object):
+class Job:
"""
This class makes an easier access to SalomeLauncher.
It adds an automatic save of the job's parameters after the launch. The save
with open(job_file_path, "r") as f:
job_string = f.read()
myjob.job_id = launcher.restoreJob(job_string)
- except:
+ except Exception:
myjob = None
return myjob