From d83efe142c1d95ac04a52b03498b32b2df33c53e Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 25 May 2019 19:48:03 +0400 Subject: =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D1=8B=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8=20=D0=B2=20=D1=88?= =?UTF-8?q?=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD=D0=B5=20=D0=B8=20=D0=BE=D0=B1?= =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=87=D0=B8=D0=BA=D0=B5=20=D0=B0?= =?UTF-8?q?=D1=80=D0=B3=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D0=BE=D0=B2=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4=D0=BD=D0=BE=D0=B9=20=D1=81=D1=82?= =?UTF-8?q?=D1=80=D0=BE=D0=BA=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- day7/main.py | 4 +++- day7/templates/form.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/day7/main.py b/day7/main.py index 7365d05..627706b 100644 --- a/day7/main.py +++ b/day7/main.py @@ -39,7 +39,7 @@ parser.add_argument( args = parser.parse_known_args(argv[1:])[0] -with (shelve.open(CONFIG_DB_PATH), shelve.open(args.cookies_db)) as (config, cookies): +with shelve.open(CONFIG_DB_PATH) as config: config['chunk'] = args.chunk_size config['short_log'] = args.short_log config['log_path'] = args.log @@ -48,7 +48,9 @@ with (shelve.open(CONFIG_DB_PATH), shelve.open(args.cookies_db)) as (config, coo config['host'] = args.host config['port'] = args.port + cookies = shelve.open(args.cookies_db) cookies['bg_color'] = args.bg_color + cookies.close() import http_handler diff --git a/day7/templates/form.html b/day7/templates/form.html index bff5030..781e448 100644 --- a/day7/templates/form.html +++ b/day7/templates/form.html @@ -48,7 +48,7 @@
-
+ Short log

-- cgit v1.2.3