Skip to content

Commit

Permalink
Rename variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesls committed Jul 15, 2021
1 parent ccc384d commit 02a03fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions chalice/utils.py
Expand Up @@ -65,9 +65,9 @@ def remove_stage_from_deployed_values(key, filename):

try:
del final_values[key]
with open(filename, 'wb') as f2:
with open(filename, 'wb') as outfile:
data = serialize_to_json(final_values)
f2.write(data.encode('utf-8'))
outfile.write(data.encode('utf-8'))
except KeyError:
# If they key didn't exist then there is nothing to remove.
pass
Expand All @@ -85,9 +85,9 @@ def record_deployed_values(deployed_values, filename):
with open(filename, 'r') as f:
final_values = json.load(f)
final_values.update(deployed_values)
with open(filename, 'wb') as f2:
with open(filename, 'wb') as outfile:
data = serialize_to_json(final_values)
f2.write(data.encode('utf-8'))
outfile.write(data.encode('utf-8'))


def serialize_to_json(data):
Expand Down

0 comments on commit 02a03fd

Please sign in to comment.