[edit] reformat string only if certain prefix is found

This commit is contained in:
Sebastian Wehling-Benatelli 2016-03-29 11:00:31 +02:00
parent f075970f5e
commit 14048d6784

View File

@ -747,7 +747,10 @@ class MainWindow(QMainWindow):
phase['lpp'] = lpp
phase['spe'] = spe
try:
phase['picker'] = str(pick.method_id).split('/')[1]
picker = str(pick.method_id)
if picker.startswith('smi:local/'):
picker = picker.split('smi:local/')[1]
phase['picker'] = picker
except IndexError:
pass