File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -43,18 +43,18 @@ def view(args):
4343 print (bold (red ("Group accounts can't print. Sorry!" )))
4444
4545
46- def adjust (args , type ):
46+ def adjust (args ):
4747 payload = Payload (
4848 user = args .user ,
4949 time = datetime .now (),
5050 pages = args .pages ,
51- action = type ,
51+ action = args . command ,
5252 staffer = current_user (),
5353 reason = args .reason ,
5454 )
5555
56- stringtype = 'Refund' if type == 'refund' else 'Forward'
57- prompt = bold (stringtype + ' {} pages to {}? [yN] ' .format (payload .pages , payload .user ))
56+ stringtype = 'Refund' if args . command == 'refund' else 'Forward'
57+ prompt = bold ('{} {} pages to {}? [yN] ' .format (stringtype , payload .pages , payload .user ))
5858 if input (prompt ) not in {'y' , 'yes' }:
5959 print ('Cancelled.' )
6060 return
@@ -102,10 +102,7 @@ def main(argv=None):
102102 print (bold (red ("The user {} doesn't exist." .format (args .user ))))
103103 return 1
104104
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 )
109106
110107
111108if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments