aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlice Ferrazzi <alicef@gentoo.org>2017-07-20 17:48:25 +0900
committerAlice Ferrazzi <alicef@gentoo.org>2017-07-20 17:48:25 +0900
commit83ce92ec1a5e512a47ae8135c97ee39447012313 (patch)
treee8f23a872bb95bb4bb9d637aa41b49cac76d5283
parentRemoved livepatchStatus and lpatch class configurations. (diff)
downloadelivepatch-83ce92ec1a5e512a47ae8135c97ee39447012313.tar.gz
elivepatch-83ce92ec1a5e512a47ae8135c97ee39447012313.tar.bz2
elivepatch-83ce92ec1a5e512a47ae8135c97ee39447012313.zip
return in case the request with same uuid is already present.
-rw-r--r--elivepatch_server/resources/dispatcher.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/elivepatch_server/resources/dispatcher.py b/elivepatch_server/resources/dispatcher.py
index f87f6e4..cf966bc 100644
--- a/elivepatch_server/resources/dispatcher.py
+++ b/elivepatch_server/resources/dispatcher.py
@@ -159,9 +159,8 @@ class GetFiles(Resource):
configFile_name = os.path.join('/tmp','elivepatch-' + args['UUID'], configFile_name)
if os.path.exists('/tmp/elivepatch-' + args['UUID']):
- # TODO: case the path already exist
print('the folder: "/tmp/elivepatch-' + args['UUID'] + '" is already present')
- pass
+ return {'the request with ' + args['UUID'] + ' is already present'}, 201
else:
print('creating: "/tmp/elivepatch-' + args['UUID'])
os.makedirs('/tmp/elivepatch-' + args['UUID'])