Skip to content

Commit

Permalink
pretty print json + response on starting server
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbarter committed Sep 26, 2022
1 parent 4a99d72 commit 8a4c635
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mini_compile_commands_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ def __init__(self, server_address, RequestHandlerClass):

def server_close(self):
with open(compile_commands_output, 'w') as f:
f.write(json.dumps(self.compile_commands))
f.write(json.dumps(self.compile_commands, indent=4))
f.write('\n')

super().server_close()

server = Server(unix_socket_file, Handler)
print("awaiting compile commands...")

def signal_handler(sig, frame):
print('')
Expand Down

0 comments on commit 8a4c635

Please sign in to comment.