Skip to content

Commit

Permalink
Fix magmaweb tests (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
ridderl committed Jun 28, 2019
1 parent 9b93fd4 commit 3e33b21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion web/magmaweb/jobquery.py
Expand Up @@ -313,7 +313,7 @@ def _write_ids_file(self, params):
ids_file.close()

def _write_msfile(self, params):
msfile = open(os.path.join(self.dir, 'ms_data.dat'), 'wb')
msfile = open(os.path.join(self.dir, 'ms_data.dat'), 'w')
if not params['ms_data_file'] is colander.null:
msf = params['ms_data_file'].file
msf.seek(0)
Expand Down
10 changes: 5 additions & 5 deletions web/magmaweb/views.py
Expand Up @@ -189,7 +189,7 @@ def login(self):

# in anonymous mode we don't want the job status to be updated
# by anyone so return the login form
is_put = self.request.method == u'PUT'
is_put = self.request.method == 'PUT'
route_name = self.request.matched_route.name
status_update = route_name == 'status.json' and is_put

Expand Down Expand Up @@ -333,13 +333,13 @@ def set_job_status(self):
# parse job launcher request
if self.request.content_type == 'application/json':
status = json.loads(self.request.body)
if status[u'done']:
if status['done']:
jobstate = 'STOPPED'
hasExitCode = status[u'exitCode'] is not None
exitCodeErr = status[u'exitCode'] != 0
hasExitCode = status['exitCode'] is not None
exitCodeErr = status['exitCode'] != 0
if hasExitCode and exitCodeErr:
jobstate = 'ERROR'
if status[u'exception']:
if status['exception']:
jobstate = 'ERROR'
else:
jobstate = status['state']
Expand Down

0 comments on commit 3e33b21

Please sign in to comment.