-# Copyright (C) 2013-2021 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2023 CEA, EDF, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
ispython = True
break
pass
- fn.close()
- except:
+ except Exception:
pass
+ finally:
+ fn.close()
if not ispython and script_extension == ".py":
currentKey = "@PYTHONBIN@ "+currentScript
else:
if not os.access(temp_dir, os.W_OK):
raise Exception("Unable to get write access to directory: %s"%temp_dir)
os.environ["OMNIORB_USER_PATH"] = temp_dir
- except:
+ except Exception:
homePath = os.path.realpath(os.path.expanduser('~'))
#defaultOmniorbUserPath = os.path.join(homePath, ".salomeConfig/USERS")
defaultOmniorbUserPath = homePath