code style
This commit is contained in:
parent
1c4543b7bf
commit
dc44c9ed61
11
server.py
11
server.py
@ -1,15 +1,17 @@
|
|||||||
from http.server import HTTPServer
|
from http.server import HTTPServer
|
||||||
from owrx.http import RequestHandler
|
from owrx.http import RequestHandler
|
||||||
from owrx.config import PropertyManager, FeatureDetector, RequirementMissingException
|
from owrx.config import PropertyManager, FeatureDetector
|
||||||
from owrx.source import SdrService
|
from owrx.source import SdrService
|
||||||
from socketserver import ThreadingMixIn
|
from socketserver import ThreadingMixIn
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
logging.basicConfig(level = logging.DEBUG, format = "%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
logging.basicConfig(level = logging.DEBUG, format = "%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
||||||
|
|
||||||
|
|
||||||
class ThreadedHttpServer(ThreadingMixIn, HTTPServer):
|
class ThreadedHttpServer(ThreadingMixIn, HTTPServer):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
print()
|
print()
|
||||||
print("OpenWebRX - Open Source SDR Web App for Everyone! | for license see LICENSE file in the package")
|
print("OpenWebRX - Open Source SDR Web App for Everyone! | for license see LICENSE file in the package")
|
||||||
@ -18,10 +20,11 @@ def main():
|
|||||||
print("Author contact info: Andras Retzler, HA7ILM <randras@sdr.hu>")
|
print("Author contact info: Andras Retzler, HA7ILM <randras@sdr.hu>")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
cfg=__import__("config_webrx")
|
cfg = __import__("config_webrx")
|
||||||
pm = PropertyManager.getSharedInstance()
|
pm = PropertyManager.getSharedInstance()
|
||||||
for name, value in cfg.__dict__.items():
|
for name, value in cfg.__dict__.items():
|
||||||
if (name.startswith("__")): continue
|
if name.startswith("__"):
|
||||||
|
continue
|
||||||
pm[name] = value
|
pm[name] = value
|
||||||
|
|
||||||
featureDetector = FeatureDetector()
|
featureDetector = FeatureDetector()
|
||||||
@ -38,5 +41,5 @@ def main():
|
|||||||
server.serve_forever()
|
server.serve_forever()
|
||||||
|
|
||||||
|
|
||||||
if __name__=="__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user