octopus_run.py 388 Bytes
Newer Older
tolsen's avatar
tolsen committed
1
#!/usr/bin/env python
Jens Jørgen Mortensen's avatar
Jens Jørgen Mortensen committed
2
from os import environ
tolsen's avatar
tolsen committed
3
4
5
6
7

label = 'oscillator'

octopus = environ['OCTOPUS_SCRIPT']
locals = {'label': label}
8
exec(open(octopus).read(), {}, locals)
tolsen's avatar
tolsen committed
9
10
11
12
13
exitcode = locals['exitcode']
if exitcode != 0:
    raise RuntimeError(('Octopus exited with exit code: %d.  ' +
                        'Check %s.log for more information.') %
                       (exitcode, label))