Skip to content

Commit

Permalink
fix regex
Browse files Browse the repository at this point in the history
  • Loading branch information
glowinthedark authored Jul 28, 2024
1 parent b577360 commit c8dc4a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pylaunchd_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,11 @@ def load_data_launchctl(self, domain_id=0):
if label:
details = self.exec(['launchctl', 'print', f'{domain}{user_identifier}/{label}'])
self.jobs[label] = details
paths = re.findall('^\s+path =\s(.*$)', details, re.MULTILINE)
paths = re.findall(r'^\s+path =\s(.*$)', details, re.MULTILINE)
path = len(paths) and paths[0] or None

if path and path.startswith('/'):
states = re.findall('^\s+state =\s(.*$)', details, re.MULTILINE)
states = re.findall(r'^\s+state =\s(.*$)', details, re.MULTILINE)
state = len(states) and states[0] or ''
data.append([label, path, state])

Expand Down

0 comments on commit c8dc4a6

Please sign in to comment.