From: Christian Heller Date: Tue, 17 Feb 2015 00:12:15 +0000 (+0100) Subject: Server/py: Apply pep8 style. X-Git-Tag: tce~532 X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/static/day?a=commitdiff_plain;h=4a1ec3a53d32f27ef42b7a2fd49bb96a2c71ea57;p=plomrogue Server/py: Apply pep8 style. --- 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: