Skip to content

Commit

Permalink
Remove CachedCTFs property and setter
Browse files Browse the repository at this point in the history
  • Loading branch information
a-larkins99 committed Mar 4, 2024
1 parent 37440c8 commit 2b24b80
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions pace_neutrons_cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,25 +125,6 @@ def IsFirstRun(self):
def IsFirstRun(self, val):
self.config['pace']['IsFirstRun'] = str(val)

@property
def CachedCTFs(self):
try:
retval = self.config['pace']['CachedCTFs'].split(';')
except KeyError:
retval = []
return [val for val in retval if val]

@CachedCTFs.setter
def CachedCTFs(self, val):
try:
val = str(val)
except:
raise RuntimeError('Cached CTF must be convertible to a string')
cached = self.CachedCTFs
if not any(d for d in cached if val in d):
cached += [val]
self.config['pace']['CachedCTFs'] = ';'.join(cached)

def save(self):
with open(self.config_file, 'w') as f:
self.config.write(f)
Expand Down

0 comments on commit 2b24b80

Please sign in to comment.