Skip to content

Commit

Permalink
Remove some debug related implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
milanbalazs committed Feb 1, 2021
1 parent 44e2432 commit 9e219d6
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 7 deletions.
9 changes: 4 additions & 5 deletions detti_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

"""
Lightweight Json based key-value DataBase.
"""

import os
import sys
import configparser
Expand Down Expand Up @@ -400,8 +404,3 @@ def sigterm_handler(*args): # pragma: no cover

if __name__ == "__main__":
detti_db = DettiDB()
detti_db["test"] = "OK"
detti_db["as"] = "ppp"
detti_db["teso"] = "uuuu"
print(detti_db["test"])
print(detti_db.search_keys_in_db("te"))
33 changes: 33 additions & 0 deletions detti_server.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# BSD 3-Clause License
#
# Copyright (c) 2021, Milan Balazs
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

"""
Server for the Detti DB.
Expand Down
2 changes: 0 additions & 2 deletions tools/color_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@

BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)

# The background is set with 40 plus the number of the color, and the foreground with 30

# These are the sequences need to get colored ouput
RESET_SEQ: str = "\033[0m"
COLOR_SEQ: str = "\033[1;%dm"
Expand Down

0 comments on commit 9e219d6

Please sign in to comment.