Skip to content

Commit

Permalink
fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Pack3tL0ss committed Nov 1, 2019
1 parent e0f26db commit b77877a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PyConsolePi/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,13 @@ def update_local_cloud_file(self, remote_consoles=None, current_remotes=None, lo
remote_consoles[_]['adapters'] = current_remotes[_]['adapters']
log.debug('[CACHE UPD] !!! Keeping Adapter data from cache as none provided in data set !!!')

with open(local_cloud_file, 'w+') as new_file:
new_file.write(json.dumps(remote_consoles, indent=4, sort_keys=True))
with open(local_cloud_file, 'w') as cloud_file:
cloud_file.write(json.dumps(remote_consoles, indent=4, sort_keys=True))
set_perm(local_cloud_file)
else:
log.warning('[CACHE UPD] cache update called with no data passed, doing nothing')

return remote_consoles if len(remote_consoles) > 0 else current_remotes
return remote_consoles

def get_adapters_via_api(self, ip):
log = self.log
Expand Down

0 comments on commit b77877a

Please sign in to comment.