Gamma correction and modification of Windows' brightness after the experiment

Hi community,
I got a bug yesterday that was quite annoying to solve. My monitor is gamma-calibrated (I used a colorCAL). When I run experiments, everything works fine. Yesterday, PsychoPy crashed before the end of the experiment (I made a mistake in the code…), and Window’s default brightness was modified. My guess is that something in win.close() or core.quit() usually prevents that to happen, but it would nice to have a workaround (run a few lines of code in psychopy that would restore windows’ brightness to default values) without having to restart the computer. Any idea ?
Thanks for your help