Changeset b8c2c67
- Timestamp:
- May 16, 2020, 12:27:01 PM (7 years ago)
- Branches:
- debian/bullseye, master
- Children:
- d8a7ace
- Parents:
- 592a561
- File:
-
- 1 edited
-
src/gnuboat/common/datahandler/rrdhandler.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/gnuboat/common/datahandler/rrdhandler.py
r592a561 rb8c2c67 19 19 import rrdtool 20 20 import os 21 from pathlib import Path 21 22 22 23 import gnuboat.common.datahandler.rrdschema as rrdschema … … 44 45 ) 45 46 ] 46 47 if not os.path.isfile(database_file): 47 if not isinstance(database_file, Path): 48 database_file = Path(database_file) 49 if not database_file.is_file(): 48 50 rrdtool.create( 49 51 database_file, "--start", start_time, "--step", str(step), … … 54 56 def rrd_update(rrdfile, value_string): 55 57 try: 58 if isinstance(rrdfile, Path): 59 rrdfile = str(rrdfile.resolve()) 56 60 rrdtool.update(rrdfile, value_string) 57 61 except Exception as e:
Note:
See TracChangeset
for help on using the changeset viewer.
