Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
OviOvocny committed Jun 23, 2020
2 parents 1236d6c + 8b8413a commit 4cc9517
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,4 @@ def put(self, id):
except exc.IntegrityError as e:
db.session().rollback()
abort(500, 'Couldn\'t assign to bin.')
return (f'included {include}, excluded {exclude}', 200)
return ('included {}, excluded {}'.format(include, exclude), 200)
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def post(self):

return {
'status': True,
'message': f'Hosts assigned to {str(len(ids))} job(s).{" " + str(skipped) + " skipped due to permissions." if skipped else ""}'
'message': 'Hosts assigned to {} job(s).{}'.format(str(len(ids)), " " + str(skipped) + " skipped due to permissions." if skipped else "")
}

@ns.route('/<int:id>')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def post(self):
unpack(file)
except ImportDependencyMissing as dep_err:
return {
'message': f'Missing dependencies: {", ".join(dep_err.missing)}',
'message': 'Missing dependencies: {}'.format(", ".join(dep_err.missing)),
'status': False
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def add (self, job):
# descend nested values by the path from earlier
for key in path:
val = val[key] if isinstance(val, dict) else getattr(val, key)
tv = f'{DEP_MAP[dep]}/{val}'
tv = '{}/{}'.format(DEP_MAP[dep], val)
# check if this dep is already recorded, if not, add it
try:
dep_index = self.dependencies.index(tv)
Expand Down

0 comments on commit 4cc9517

Please sign in to comment.