Skip to content

Commit 3a7da5a

Browse files
ArminArmin
authored andcommitted
some fixes
1 parent 2655934 commit 3a7da5a

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

‎pyload/config/Setup.py‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ def __init__(self, config):
2424
self.lang = "en"
2525
self.stdin_encoding = get_console_encoding(sys.stdin.encoding)
2626

27+
# Input shorthand for yes
28+
self.yes = "y"
29+
# Input shorthand for no
30+
self.no = "n"
31+
2732

2833
def start(self):
2934
print
@@ -383,7 +388,7 @@ def set_user(self):
383388
print _("2 - List users")
384389
print _("3 - Remove user")
385390
print _("4 - Quit")
386-
action = raw_input("[1]/2/3/4: ")
391+
action = raw_input("1/2/3/4: ")
387392
if not action in ("1", "2", "3", "4"):
388393
continue
389394
elif action == "1":
@@ -463,8 +468,8 @@ def print_dep(self, name, value, false="MISSING", true="OK"):
463468
info = ""
464469

465470
print "%(dep)-12s %(bool)s (%(info)s)" % {'dep': name + ':',
466-
'bool': _(true if value else false).upper(),
467-
'info': info}
471+
'bool': _(true if value else false).upper(),
472+
'info': info}
468473

469474

470475
def check_module(self, module):

‎pyload/database/User.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def listUsers(db):
8282
@style.queue
8383
def getAllUserData(db):
8484
db.c.execute("SELECT name, permission, role, template, email FROM users")
85-
return {{"permission": r[1], "role": r[2], "template": r[3], "email": r[4]} for r in db.c}
85+
return {r[0]: {"permission": r[1], "role": r[2], "template": r[3], "email": r[4]} for r in db.c}
8686

8787

8888
@style.queue

‎pyload/utils/printer.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88

99
def color(color, text):
10-
return colorama.Fore.(c.upper())(text)
10+
return colorama.Fore[c.upper()](text)
1111

1212
for c in colorama.Fore:
13-
eval("%(color) = lambda msg: color(%(color), msg)" % {'color': c.lower()}
13+
eval("%(color)s = lambda msg: color(%(color)s, msg)" % {'color': c.lower()})
1414

1515

1616
def overline(line, msg):

0 commit comments

Comments
 (0)