
import argparse
import getpass

import github3


def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('--username'),
    parser.add_argument('--password'),
    args = parser.parse_args()

    if args.password is None:
        password = getpass.getpass(
            'Password for github user "{}":'.format(args.username))
    else:
        password = args.password

    github = github3.login(args.username, password=password)


import argparse
import getpass

import github3


def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('--username'),
    parser.add_argument('--password'),
    args = parser.parse_args()

    if args.password is None:
        password = getpass.getpass(
            'Password for github user "{}":'.format(args.username))
    else:
        password = args.password

    github = github3.login(args.username, password=password)

    if github is None:
        print('Failed to sign into github')

Print message if signing in failed
Print message if signing in failed

  
  import argparse
  import getpass
  
  import github3
  
  
  def main():
      parser = argparse.ArgumentParser()
      parser.add_argument('--username'),
      parser.add_argument('--password'),
      args = parser.parse_args()
  
      if args.password is None:
          password = getpass.getpass(
              'Password for github user "{}":'.format(args.username))
      else:
          password = args.password
  
      github = github3.login(args.username, password=password)
  
+     if github is None:
+         print('Failed to sign into github')
+ 
Print message if signing in failed
## Code Before:

import argparse
import getpass

import github3


def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('--username'),
    parser.add_argument('--password'),
    args = parser.parse_args()

    if args.password is None:
        password = getpass.getpass(
            'Password for github user "{}":'.format(args.username))
    else:
        password = args.password

    github = github3.login(args.username, password=password)

## Instruction:
Print message if signing in failed
## Code After:

import argparse
import getpass

import github3


def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('--username'),
    parser.add_argument('--password'),
    args = parser.parse_args()

    if args.password is None:
        password = getpass.getpass(
            'Password for github user "{}":'.format(args.username))
    else:
        password = args.password

    github = github3.login(args.username, password=password)

    if github is None:
        print('Failed to sign into github')
