summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSanto Cariotti <sancn@live.com>2017-12-31 12:37:53 +0100
committerSanto Cariotti <sancn@live.com>2017-12-31 12:37:53 +0100
commitf2e584d364fa9794d509dcb30512a1342fd4b817 (patch)
tree4cf0a096235b02c2c5eef7a95a46dad15e5d4ee7 /lib
parent3282fe91dd01f006b416c0057f8c59f3b1b950d9 (diff)
fixed 'add' command
Diffstat (limited to 'lib')
-rw-r--r--lib/app.py6
-rw-r--r--lib/commands.py3
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/app.py b/lib/app.py
index ba8b5d6..721eec1 100644
--- a/lib/app.py
+++ b/lib/app.py
@@ -12,7 +12,7 @@ class Stout(Commands):
def getName(self):
word = ' (' + self.name + ' ) '
- if self.user == '':
+ if self.user == '|':
return word
else:
return word + GREY + '(' + self.user + ') '
@@ -70,7 +70,9 @@ if __name__ == '__main__':
cmd = ''
if not os.path.isfile(config['path']):
- open(config['path'], 'wb').close()
+ fo = open(config['path'], 'wb')
+ fo.write('|\n'.encode('utf-8'))
+ fo.close()
while cmd != 'quit':
try:
diff --git a/lib/commands.py b/lib/commands.py
index 3df279c..b0d07a3 100644
--- a/lib/commands.py
+++ b/lib/commands.py
@@ -89,9 +89,6 @@ class Commands(object):
try:
with open(co['path'], 'ab+') as fout:
- if fout.readline().decode('utf-8') == '':
- fout.write(('\n').encode('utf-8'))
-
fout.write((msg + '\n').encode('utf-8'))
print('Ok')