Skip to content

Commit

Permalink
Updated 'futures' import name and switched Wikipedia to return https …
Browse files Browse the repository at this point in the history
…link instead
  • Loading branch information
markneves committed Aug 9, 2015
1 parent 91e6973 commit 986a486
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/cmds/wiki.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
def wiki(components): # !wiki <search term>
'''Returns a wiki link and the first paragraph of the page'''

main_page = 'http://en.wikipedia.org/wiki/Main_Page'
main_page = 'https://en.wikipedia.org/wiki/Main_Page'

wlink = components['arguments'].split('!wiki ') # notice the trailing space
if 1 == len(wlink): # no search term given, the Main_Page is "displayed"
Expand All @@ -15,7 +15,7 @@ def wiki(components): # !wiki <search term>
if len(search_term) < 1:
response = main_page
else:
response = 'http://en.wikipedia.org/wiki/' + search_term
response = 'https://en.wikipedia.org/wiki/' + search_term

response = response + '\r\n' + get_paragraph(response)

Expand Down
4 changes: 2 additions & 2 deletions src/ircbot.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env python2.7
import sys
import signal
import futures
import concurrent.futures
import logging
import os

Expand All @@ -19,7 +19,7 @@ def run(socket, channels, cmds, nick):

# TODO: don't let commands to run for more than one minute

with futures.ProcessPoolExecutor(max_workers=num_workers) as executor:
with concurrent.futures.ProcessPoolExecutor(max_workers=num_workers) as executor:
while len(channels):
receive = socket.recv(4096)
buff = buff + receive
Expand Down

0 comments on commit 986a486

Please sign in to comment.