Skip to content

Commit

Permalink
Fixed pattern.pattern issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Plazmaz committed May 20, 2019
1 parent 340257b commit c27b5ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lh/server/probe_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,16 @@ def handle_client(self, client, address):

# Try with small/normal size, then try a larger pattern limit if we hit a value error.
try:
response = self.small_gen.xeger(pattern.pattern)
response = self.small_gen.xeger(pattern)
except ValueError:
logging.warning(
'Unable to generate small response for repeat in regex "%s". Trying larger generator...',
pattern.pattern)
pattern)
try:
response = self.large_gen.xeger(pattern.pattern)
response = self.large_gen.xeger(pattern)
except ValueError:
logging.error('Unable to generate response for overly long repeat in regex "%s"',
pattern.pattern)
pattern)
response = ''

response = response.encode('utf-8').decode()
Expand Down

0 comments on commit c27b5ce

Please sign in to comment.