File tree 1 file changed +5
-8
lines changed
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -43,18 +43,18 @@ def view(args):
43
43
print (bold (red ("Group accounts can't print. Sorry!" )))
44
44
45
45
46
- def adjust (args , type ):
46
+ def adjust (args ):
47
47
payload = Payload (
48
48
user = args .user ,
49
49
time = datetime .now (),
50
50
pages = args .pages ,
51
- action = type ,
51
+ action = args . command ,
52
52
staffer = current_user (),
53
53
reason = args .reason ,
54
54
)
55
55
56
- stringtype = 'Refund' if type == 'refund' else 'Forward'
57
- prompt = bold (stringtype + ' {} pages to {}? [yN] ' .format (payload .pages , payload .user ))
56
+ stringtype = 'Refund' if payload . action == 'refund' else 'Forward'
57
+ prompt = bold ('{} + {} pages to {}? [yN] ' .format (stringtype , payload .pages , payload .user ))
58
58
if input (prompt ) not in {'y' , 'yes' }:
59
59
print ('Cancelled.' )
60
60
return
@@ -102,10 +102,7 @@ def main(argv=None):
102
102
print (bold (red ("The user {} doesn't exist." .format (args .user ))))
103
103
return 1
104
104
105
- if args .command == 'refund' or args .command == 'forward' :
106
- return commands [args .command ](args , args .command )
107
- else :
108
- return commands [args .command ](args )
105
+ return commands [args .command ](args )
109
106
110
107
111
108
if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments