Skip to content

Commit

Permalink
library: fix StringIO usage
Browse files Browse the repository at this point in the history
  • Loading branch information
saltydk committed Nov 20, 2024
1 parent 2803175 commit b3a826b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/saltbox_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import grp
import tempfile
import shutil
from io import StringIO

def validate_instance_name(instance):
"""
Expand Down Expand Up @@ -178,7 +179,7 @@ def load_and_save_facts(file_path, instance, keys, owner, group, mode):
changed = True

if changed:
with tempfile.StringIO() as string_buffer:
with StringIO() as string_buffer:
config.write(string_buffer)
config_str = string_buffer.getvalue()

Expand Down

0 comments on commit b3a826b

Please sign in to comment.