Francesco Romani has posted comments on this change. Change subject: Speed up screenlocking on systems with logind ......................................................................
Patch Set 2: Code-Review+1 (1 comment) looks good http://gerrit.ovirt.org/#/c/28201/2/ovirt-guest-agent/LockActiveSession.py File ovirt-guest-agent/LockActiveSession.py: Line 137: Line 138: Line 139: def main(): Line 140: if os.path.exists('/usr/bin/loginctl'): Line 141: subprocess.call(['/usr/bin/loginctl', 'lock-sessions']) In general, I'm not a fan of the pattern if exists(resource): use(resource) I'd rather use try: use(resource) except ResourceNotAvailable: do_something() (aka EAFP vs LBYL - I'm all for EAFP). However, this is not important enough to downvote this patch. Line 142: else: Line 143: session = GetActiveSession() Line 144: if session is not None: Line 145: try: -- To view, visit http://gerrit.ovirt.org/28201 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaaf01e5c6c612178f207e3acfc877d30e0a09ec8 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-guest-agent Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra <vfeen...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com> Gerrit-Reviewer: Vinzenz Feenstra <vfeen...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches