Skip to content

Commit

Permalink
Merge pull request PokemonGoF#296 from Klohto/dev
Browse files Browse the repository at this point in the history
Interface: Exit message on Keyboard Interrupt
  • Loading branch information
douglascamata authored Jul 22, 2016
2 parents d933c30 + 44024ff commit 69f1356
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions pokecli.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,18 @@ def main():
print_green('[x] PokemonGO Bot v1.0')
print_yellow('[x] Configuration initialized')

bot = PokemonGoBot(config)
bot.start()
try:
bot = PokemonGoBot(config)
bot.start()

print_green('[x] Starting PokemonGo Bot....')
print_green('[x] Starting PokemonGo Bot....')

while(True):
bot.take_step()
while(True):
bot.take_step()

except KeyboardInterrupt:
print_red("\n"'[x]Exiting PokemonGo Bot')
#TODO Add number of pokemon catched, pokestops visited, highest CP pokemon catched, etc.

if __name__ == '__main__':
main()

0 comments on commit 69f1356

Please sign in to comment.