summaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
authorSanto Cariotti <sancn@live.com>2017-07-20 13:24:34 +0200
committerSanto Cariotti <sancn@live.com>2017-07-20 13:24:34 +0200
commit6d1aff6894408c89d7a549076293fe011e475eb0 (patch)
treee19e40b5d667b8281331a982be6a0c067cd5e8fe /app.py
parentc95062f5ac0b16dcb0a1c5f1c3fc5762112ff371 (diff)
added get comand
Diffstat (limited to 'app.py')
-rw-r--r--app.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/app.py b/app.py
index 2dc8f66..1d9b65b 100644
--- a/app.py
+++ b/app.py
@@ -9,16 +9,16 @@ class Stout(Commands):
self.user = Stout.username()
def getName(self):
- word = " (" + self.name + ") "
+ word = ' (' + self.name + ') '
if self.user == '':
return word
else:
- return word + Colors.grey + "(" + self.user + ":" + host + ") "
+ return word + Colors.grey + '(' + self.user + ':' + host + ') '
@staticmethod
def username():
if r.hget('user:'+host, 'name') is not None:
- return r.hget('user:'+host, 'name').decode("utf-8")
+ return r.hget('user:'+host, 'name').decode('utf-8')
else:
return ''
@@ -34,7 +34,7 @@ class Stout(Commands):
if cmd[0] == 'info' and count == 1:
print(ListCommands.info['info'])
elif cmd[0] == 'info' and count == 2:
- print(ListCommands.info[cmd[1]])
+ print(ListCommands.info[cmd[1]][0])
else:
raise KeyError
except (KeyError, IndexError):
@@ -52,7 +52,7 @@ if __name__ == '__main__':
app = Stout()
cmd = ''
while cmd != 'quit':
- cmd = input(">" + Colors.yellow + app.getName() + Colors.black)
+ cmd = input('>' + Colors.yellow + app.getName() + Colors.black)
app.action(cmd)
r.save()