Conversation
bgcval2/download_from_mass.py
Outdated
| os.chmod(outputFold, st.st_mode | stat.S_IWGRP) | ||
|
|
||
| try: os.chmod(outputFold, st.st_mode | stat.S_IWGRP) | ||
| except: pass |
There was a problem hiding this comment.
This should be something, not except pass.
There was a problem hiding this comment.
fully agreed, maybe an OSError: could not change permissions on such and such?
bgcval2/download_from_mass.py
Outdated
| print('writing file in shared path', shared_file_path) | ||
| shutil.copy(download_script_path, shared_file_path) | ||
| try: shutil.copy(download_script_path, shared_file_path) | ||
| except: pass |
There was a problem hiding this comment.
This should be something, no except pass
There was a problem hiding this comment.
well, what'd you expect here to go wrong, maybe an IOError I think?
There was a problem hiding this comment.
that's the BaseClass of IOError and such, I've not used the base class ever - you need to put whatever that should raise - am not sure what, you'd know 😃
There was a problem hiding this comment.
I'm not sure either - I don't make errors...
...
...
...
😆
There was a problem hiding this comment.
hahaha 🤣 Seriously now - whatever happens in there when there is an exception - make the thing fail and see what exception it throws
valeriupredoi
left a comment
There was a problem hiding this comment.
awesome, bud! Just a couple very small wiggles from me 🍺
bgcval2/download_from_mass.py
Outdated
| print('writing file in shared path', shared_file_path) | ||
| shutil.copy(download_script_path, shared_file_path) | ||
| try: shutil.copy(download_script_path, shared_file_path) | ||
| except: pass |
There was a problem hiding this comment.
well, what'd you expect here to go wrong, maybe an IOError I think?
Co-authored-by: Valeriu Predoi <valeriu.predoi@gmail.com>
Co-authored-by: Valeriu Predoi <valeriu.predoi@gmail.com>
Co-authored-by: Valeriu Predoi <valeriu.predoi@gmail.com>
|
@tillku mentioned to me yesterday that he's still facing troubles - Till, did you grab this branch and tested with it? If so, could you pls tell us what went wrong? 🍺 |
|
this is starting to smell like abandonware - shall we merge this @ledm ? |
u-cp647
|
maybe make those excepts more except-y and merge this? @ledm 🍺 |
Earlier this year, we changed how the area data is loaded by bgcval2, so that we use the local version of area in the ptrc, grid and diag nemo files, instead of relying on an old nemo meshmask file.
A problem occurred when we encountered u-cp647 which has "area_grid_T" and "area_grid_W" instead of "area". We now use "choose_best_var" to load the area data.
We also fix a problem where chmod fails when a folder was created by another user.
We also fix a problem when multiple users want to download the same jobID.