Skip to content

Commit

Permalink
Clean up the pre-call handling
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Nov 20, 2016
1 parent b8fffaf commit 54cba71
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions oct2py/core.py
Expand Up @@ -809,10 +809,9 @@ def evaluate(self, cmds, logger=None, out_file='', log=True,
self.write(output + '\n')

# Run the pre-call
pre = self.expect('%s|error: |parse error:' % chr(2))
if (chr(2)) not in pre:
raise Oct2PyError('Error in pre_call: %s' % pre)
self.expect(chr(2))

# Try and start the eval
resp = self.expect('%s|error: |parse error:' % chr(2))

if 'parse error:' in resp:
Expand Down

0 comments on commit 54cba71

Please sign in to comment.