Skip to content

Commit

Permalink
genconfig.py: fix unused file() command
Browse files Browse the repository at this point in the history
file() is python2, this was not converted.

Signed-off-by: Glauber Costa <glauber@scylladb.com>
  • Loading branch information
Glauber Costa committed Jul 3, 2019
1 parent 4a2e9f3 commit f402332
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions genconfig.py
Expand Up @@ -40,8 +40,8 @@ def dump_yaml_no_dc(directory, filename, servers):
if err.errno != 17:
raise
pass
stream = file(os.path.join(directory, filename), 'w')
yaml.dump([{"targets": servers}], stream, default_flow_style=False)
with open(os.path.join(directory, filename), 'w') as stream:
yaml.dump([{"targets": servers}], stream, default_flow_style=False)

def dump_yaml(directory, filename, servers, cluster):
try:
Expand Down

0 comments on commit f402332

Please sign in to comment.