Skip to content

Commit

Permalink
Only check unit path if there is a PID
Browse files Browse the repository at this point in the history
Since 20f23c6 & ee1c7f7 Kernal updated now added a fake AffectedApplication, this can cause a problem if we assume every AffectedApplication has at least 1 instance.
  • Loading branch information
sean797 committed May 23, 2017
1 parent ee1c7f7 commit d19772c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tracer/resources/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class AffectedApplication(Application):
def name(self):
if System.init_system() == "systemd":
bus = SystemdDbus()
if bus.unit_path_from_pid(self.instances[0].pid):
if self.instances and bus.unit_path_from_pid(self.instances[0].pid):
if not bus.has_service_property_from_pid(self.instances[0].pid,'PAMName'):
Id = bus.get_unit_property_from_pid(self.instances[0].pid,'Id')
if re.search("\.service$", Id):
Expand Down

0 comments on commit d19772c

Please sign in to comment.