Commit 461c5a4 1 parent 6d80dfb commit 461c5a4 Copy full SHA for 461c5a4
File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 6
6
app = Flask (__name__ )
7
7
8
8
# This must be imported after the Flask app is created
9
- from service import routes
9
+ from service import routes
10
10
from service .common import log_handlers
11
11
12
12
log_handlers .init_logging (app , "gunicorn.error" )
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ def create_counters(name):
58
58
app .logger .info ("Request to Create counter: %s..." , name )
59
59
60
60
if name in COUNTER :
61
- output_string = f"Counter { name } already exists"
61
+ output_string = f"Counter { name } already exists"
62
62
return abort (status .HTTP_409_CONFLICT , output_string )
63
63
64
64
COUNTER [name ] = 0
@@ -80,7 +80,7 @@ def read_counters(name):
80
80
app .logger .info ("Request to Read counter: %s..." , name )
81
81
82
82
if name not in COUNTER :
83
- output_string = f"Counter { name } does not exist"
83
+ output_string = f"Counter { name } does not exist"
84
84
return abort (status .HTTP_404_NOT_FOUND , output_string )
85
85
86
86
counter = COUNTER [name ]
@@ -96,7 +96,8 @@ def update_counters(name):
96
96
app .logger .info ("Request to Update counter: %s..." , name )
97
97
98
98
if name not in COUNTER :
99
- return abort (status .HTTP_404_NOT_FOUND , f"Counter { name } does not exist" )
99
+ output_string = f"Counter { name } does not exist"
100
+ return abort (status .HTTP_404_NOT_FOUND , output_string )
100
101
101
102
COUNTER [name ] += 1
102
103
You can’t perform that action at this time.
0 commit comments