Skip to content

Commit

Permalink
Fix web-backend
Browse files Browse the repository at this point in the history
  • Loading branch information
dima74 committed May 23, 2018
1 parent 39bcfbe commit 35d18ba
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions web-backend/src/wikipedia.py
Expand Up @@ -8,6 +8,10 @@


def create_all_pages():
global all_pages
global maximum_number_replaces
global number_pages_with_number_replaces_more_than

def parse_page(line):
first_space_index = line.index(' ')
number_replaces = int(line[:first_space_index])
Expand All @@ -33,10 +37,10 @@ def parse_page(line):
number_pages_with_number_replaces_more_than[number_replaces] = len(all_pages)
number_replaces -= 1

return [page[1] for page in all_pages]
all_pages = [page[1] for page in all_pages]


all_pages = create_all_pages()
create_all_pages()


def add_parameter_format_json(kwargs, parameter):
Expand Down

0 comments on commit 35d18ba

Please sign in to comment.