summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSanto Cariotti <sancn@live.com>2017-08-22 11:54:40 +0200
committerSanto Cariotti <sancn@live.com>2017-08-22 11:54:40 +0200
commit6a76576558adc8cf15d7b44b59f0c1dc00c5b729 (patch)
treeffa69784752fe7376480d7fef7c01df5f3dccd6d /lib
parent19701a38439cc45c52b3c95c05b9a74763d7f1a3 (diff)
deleted redis conf
Diffstat (limited to 'lib')
-rw-r--r--lib/app.py8
-rw-r--r--lib/classes.py4
-rw-r--r--lib/commands.py2
-rw-r--r--lib/config.py4
4 files changed, 5 insertions, 13 deletions
diff --git a/lib/app.py b/lib/app.py
index c3ec9a7..5e0b3d8 100644
--- a/lib/app.py
+++ b/lib/app.py
@@ -1,4 +1,4 @@
-from classes import r, clear, YELLOW, BLACK, GREY
+from classes import clear, YELLOW, BLACK, GREY
from commands import Commands
from listcommands import ListCommands
import os.path
@@ -24,12 +24,12 @@ class Stout(Commands):
"""
try:
with open(config['path'], 'rb') as fin:
- user = fin.readline()
+ user = fin.readline().split()
- if user == '':
+ if user[0] == '':
return ''
else:
- return user.decode('utf-8')
+ return user[0].decode('utf-8')
except Exception:
return ''
diff --git a/lib/classes.py b/lib/classes.py
index 1da06f3..56a59d3 100644
--- a/lib/classes.py
+++ b/lib/classes.py
@@ -1,12 +1,8 @@
-import redis, os
-
try:
from .config import config as co
except SystemError:
from config import config as co
-r = redis.Redis(host=co['host'], port=co['port'], unix_socket_path=co['unix_socket_path'], db=co['db'])
-
RED = '\033[91m'
YELLOW = '\033[93m'
GREY = '\033[90m'
diff --git a/lib/commands.py b/lib/commands.py
index 2e347d3..ec44558 100644
--- a/lib/commands.py
+++ b/lib/commands.py
@@ -1,4 +1,4 @@
-from classes import PersonalError, r, clear, RED, GREY
+from classes import PersonalError, clear, RED, GREY
from listcommands import ListCommands
from config import config as co
diff --git a/lib/config.py b/lib/config.py
index 3e82544..aa90fdb 100644
--- a/lib/config.py
+++ b/lib/config.py
@@ -1,7 +1,3 @@
config = {
- 'host' : 'localhost',
- 'port' : 6379,
- 'db' : 0,
- 'unix_socket_path' : None,
'path' : '/tmp/stout',
}