mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-22 13:34:04 +03:00
Fixed makefile
This commit is contained in:
parent
d33e5e3a1e
commit
e13c8a93b3
@ -16,7 +16,7 @@ XDGAUTOSTARTDIR := $(DESTDIR)/etc/xdg/autostart
|
||||
KDEAUTOSTARTDIR := $(DESTDIR)/usr/share/autostart
|
||||
|
||||
PYC := $(shell find $(SOURCEDIR) -name '*.py[co]')
|
||||
CACHES := $(shell find $(SOURCEDIR) -name '__pycache__')
|
||||
CACHES := $(shell find $(SOURCEDIR) -name '__pycache__' -o -name '.mypy_cache')
|
||||
|
||||
clean:
|
||||
rm -rf $(PYC) $(CACHES) $(DESTDIR)
|
||||
@ -39,9 +39,9 @@ udsactor:
|
||||
mkdir -p $(POLKITDIR)
|
||||
mkdir -p $(XDGAUTOSTARTDIR)
|
||||
mkdir -p $(KDEAUTOSTARTDIR)
|
||||
|
||||
|
||||
mkdir $(LIBDIR)/img
|
||||
|
||||
|
||||
# Cleans up .pyc and cache folders
|
||||
rm -f $(PYC) $(CACHES)
|
||||
|
||||
|
@ -248,7 +248,12 @@ class UDSServerApi(UDSApi):
|
||||
|
||||
def login(self, own_token: str, username: str) -> types.LoginResultInfoType:
|
||||
if not own_token:
|
||||
return
|
||||
return types.LoginResultInfoType(
|
||||
ip='0.0.0.0',
|
||||
hostname='unknown',
|
||||
dead_line=None,
|
||||
max_idle=None
|
||||
)
|
||||
payload = {
|
||||
'token': own_token,
|
||||
'username': username
|
||||
|
@ -40,7 +40,7 @@ from . import platform
|
||||
from . import rest
|
||||
from . import types
|
||||
|
||||
from .log import logger
|
||||
from .log import logger, DEBUG, INFO, ERROR, FATAL
|
||||
from .http import clients_pool, server
|
||||
|
||||
# def setup() -> None:
|
||||
@ -89,7 +89,11 @@ class CommonService: # pylint: disable=too-many-instance-attributes
|
||||
self._http = None
|
||||
|
||||
# Initialzies loglevel and serviceLogger
|
||||
logger.setLevel(self._cfg.log_level * 10000)
|
||||
# 0 = DEBUG, 1 = INFO, 2 = ERROR, 3 = FATAL in combobox
|
||||
# BUT!!!:
|
||||
# 0 = OTHER, 10000 = DEBUG, 20000 = WARN, 30000 = INFO, 40000 = ERROR, 50000 = FATAL
|
||||
# So this comes:
|
||||
logger.setLevel([DEBUG, INFO, ERROR, FATAL][self._cfg.log_level])
|
||||
# If windows, enable service logger
|
||||
logger.enableServiceLogger()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user