Skip to content

Commit 461c5a4

Browse files
committed
fix
1 parent 6d80dfb commit 461c5a4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

service/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
app = Flask(__name__)
77

88
# This must be imported after the Flask app is created
9-
from service import routes
9+
from service import routes
1010
from service.common import log_handlers
1111

1212
log_handlers.init_logging(app, "gunicorn.error")

service/routes.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def create_counters(name):
5858
app.logger.info("Request to Create counter: %s...", name)
5959

6060
if name in COUNTER:
61-
output_string=f"Counter {name} already exists"
61+
output_string = f"Counter {name} already exists"
6262
return abort(status.HTTP_409_CONFLICT, output_string)
6363

6464
COUNTER[name] = 0
@@ -80,7 +80,7 @@ def read_counters(name):
8080
app.logger.info("Request to Read counter: %s...", name)
8181

8282
if name not in COUNTER:
83-
output_string=f"Counter {name} does not exist"
83+
output_string = f"Counter {name} does not exist"
8484
return abort(status.HTTP_404_NOT_FOUND, output_string)
8585

8686
counter = COUNTER[name]
@@ -96,7 +96,8 @@ def update_counters(name):
9696
app.logger.info("Request to Update counter: %s...", name)
9797

9898
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)
100101

101102
COUNTER[name] += 1
102103

0 commit comments

Comments
 (0)