From 4a1ec3a53d32f27ef42b7a2fd49bb96a2c71ea57 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Tue, 17 Feb 2015 01:12:15 +0100 Subject: [PATCH] Server/py: Apply pep8 style. --- plomrogue-server.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/plomrogue-server.py b/plomrogue-server.py index 04bc1d6..f78d12b 100755 --- a/plomrogue-server.py +++ b/plomrogue-server.py @@ -1,4 +1,7 @@ -import errno, os, time +import errno +import os +import time + def setup_server_io(io_db): """Fill IO files DB with proper file( path)s. Write process IO test string. @@ -23,16 +26,17 @@ def setup_server_io(io_db): io_db["file_in"].close() io_db["file_in"] = open(io_db["path_in"], "r") + def cleanup_server_io(io_db): """Close and remove all files in IO files DB.""" io_db["file_out"].close() os.remove(io_db["path_out"]) io_db["file_in"].close() os.remove(io_db["path_in"]) - if "file_worldstate" in io_db: # This file is only set up - io_db["file_worldstate"].close() # properly when the game - if os.access(io_db["path_worldstate"], os.F_OK): # world is active, which is - os.remove(io_db["path_worldstate"]) # not guaranteed. + if "file_worldstate" in io_db: # This file's only set up + io_db["file_worldstate"].close() # properly when the game + if os.access(io_db["path_worldstate"], os.F_OK): # world is active, which + os.remove(io_db["path_worldstate"]) # is not guaranteed. io_db = {} try: -- 2.30.2