Skip to content

Commit

Permalink
fix: make sync a no-opt on local data
Browse files Browse the repository at this point in the history
fixes #380 by avoiding to overwrite data
with partial data from disk
  • Loading branch information
jenshnielsen authored and giulioungaretti committed Jan 17, 2017
1 parent 1e34423 commit f08264a
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions qcodes/data/data_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,15 +392,7 @@ def sync(self):
# could find a robust and intuitive way to make modifications to the
# version on the DataServer from the main copy)
if not self.is_live_mode:
# LOCAL DataSet - just read it in
# Compare timestamps to avoid overwriting unsaved data
if self.last_store > self.last_write:
return True
try:
self.read()
except IOError:
# if no files exist, they probably haven't been created yet.
pass
# LOCAL DataSet - no need to sync just use local data
return False
# TODO - for remote live plotting, maybe set some timestamp
# threshold and call it static after it's been dormant a long time?
Expand Down

0 comments on commit f08264a

Please sign in to comment.