Guest User

Untitled

a guest
Nov 24th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. diff --git a/swedbank-cli b/swedbank-cli
  2. index 4f2fed0..cc0f92a 100755
  3. --- a/swedbank-cli
  4. +++ b/swedbank-cli
  5. @@ -97,11 +97,9 @@ def main():
  6. (options, args) = parser.parse_args()
  7. username = options.username
  8. password = options.password
  9. - if not username:
  10. - print "You need a username"
  11. - sys.exit(1)
  12. - if not password:
  13. - print "You need a password"
  14. +
  15. + if not (username and password):
  16. + parser.print_help()
  17. sys.exit(1)
  18.  
  19. if options.account:
  20. @@ -118,4 +116,4 @@ def main():
  21. swed.accounts(account)
  22.  
  23. if __name__ == "__main__":
  24. - main()
  25. \ No newline at end of file
  26. + main()
Add Comment
Please, Sign In to add comment