mirror of
https://github.com/cve-search/cpe-guesser.git
synced 2024-11-24 15:57:22 +00:00
fix: [clean-up] remove unused imports & variables
This commit is contained in:
parent
a9b7c0c5f8
commit
0e1b0942c4
1 changed files with 2 additions and 5 deletions
|
@ -5,8 +5,6 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import falcon
|
import falcon
|
||||||
from wsgiref.simple_server import make_server
|
from wsgiref.simple_server import make_server
|
||||||
import requests
|
|
||||||
from datetime import datetime
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
runPath = os.path.dirname(os.path.realpath(__file__))
|
runPath = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
@ -15,7 +13,6 @@ from lib.cpeguesser import CPEGuesser
|
||||||
|
|
||||||
class Search():
|
class Search():
|
||||||
def on_post(self, req, resp):
|
def on_post(self, req, resp):
|
||||||
ret = []
|
|
||||||
data_post = req.bounded_stream.read()
|
data_post = req.bounded_stream.read()
|
||||||
js = data_post.decode('utf-8')
|
js = data_post.decode('utf-8')
|
||||||
try:
|
try:
|
||||||
|
@ -23,10 +20,10 @@ class Search():
|
||||||
except ValueError:
|
except ValueError:
|
||||||
resp.status = falcon.HTTP_400
|
resp.status = falcon.HTTP_400
|
||||||
resp.media = "Missing query array or incorrect JSON format"
|
resp.media = "Missing query array or incorrect JSON format"
|
||||||
return
|
return
|
||||||
|
|
||||||
if 'query' in q:
|
if 'query' in q:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
resp.status = falcon.HTTP_400
|
resp.status = falcon.HTTP_400
|
||||||
resp.media = "Missing query array or incorrect JSON format"
|
resp.media = "Missing query array or incorrect JSON format"
|
||||||
|
|
Loading…
Reference in a new issue