Skip to content

Commit

Permalink
Merge pull request #725 from lnls-sirius/force_window
Browse files Browse the repository at this point in the history
Add "force-new-window" argument to launcher
  • Loading branch information
JAFeltran authored Nov 26, 2024
2 parents 50d6e76 + da620f6 commit 0c82c3d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyqt-apps/scripts/sirius-hla-as-ap-launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
parser.add_argument(
'-p', "--prefix", type=str, default=VACA_PREFIX,
help="Define the prefix for the PVs in the window.")
parser.add_argument('-f', "--force-new-window", action='store_true',
help="Force the creation of a new window")
args = parser.parse_args()

need_new_window = True
returnval = _subprocess.getoutput(
'ps h -A -o pid,sess,command= | grep "[s]irius-hla-as-ap-launcher.py"')
if returnval:
if not args.force_new_window and returnval:
for info in returnval.split('\n'):
pid, _, comm = info.split()[:3]
window = util.check_window_by_pid(pid, comm)
Expand Down

0 comments on commit 0c82c3d

Please sign in to comment.