Bugfix: do not open a measurement for writing on constructor of measurement
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e435dc9ecd
commit
5a7ae3eb33
@ -1,8 +1,8 @@
|
||||
// lasp_clip.h
|
||||
//
|
||||
// Author: J.A. de Jong - ASCEE
|
||||
// Author: J.A. de Jong, C.R.D. Jansen - ASCEE
|
||||
//
|
||||
// Description: Peak Programme Meter
|
||||
// Description: Clip handler
|
||||
#pragma once
|
||||
#include <memory>
|
||||
#include "lasp_filter.h"
|
||||
|
@ -196,7 +196,7 @@ class Measurement:
|
||||
|
||||
# Open the h5 file in read-plus mode, to allow for changing the
|
||||
# measurement comment.
|
||||
with h5.File(fn, 'r+') as f:
|
||||
with h5.File(fn, 'r') as f:
|
||||
# Check for video data
|
||||
try:
|
||||
f['video']
|
||||
@ -234,10 +234,9 @@ class Measurement:
|
||||
self._channelNames = [f'Unnamed {i}' for i in range(self.nchannels)]
|
||||
|
||||
# comment = read-write thing
|
||||
try:
|
||||
if 'comment' in f.keys():
|
||||
self._comment = f.attrs['comment']
|
||||
except KeyError:
|
||||
f.attrs['comment'] = ''
|
||||
else:
|
||||
self._comment = ''
|
||||
|
||||
# Sensitivity
|
||||
|
Loading…
Reference in New Issue
Block a user