Skip to content

Commit

Permalink
Fixes incorrect numbering in process lists when nplugins > 9
Browse files Browse the repository at this point in the history
  • Loading branch information
nicwade committed Aug 8, 2018
1 parent 64d4958 commit b9f5619
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/config_generator/savu_config.py
Expand Up @@ -20,6 +20,7 @@

from __future__ import print_function

import re
import sys

from content import Content
Expand Down Expand Up @@ -120,7 +121,7 @@ def _set(content, args):
def _add(content, args):
""" Add a plugin to the list. """
elems = content.get_positions()
final = str(int(list(elems[-1])[0])+1) if elems else 1
final = str(int(re.findall(r'\d+', elems[-1])[0])+1) if elems else 1
content.add(args.name, args.pos if args.pos else str(final))
_disp(content, '-q')
return content
Expand Down

0 comments on commit b9f5619

Please sign in to comment.