Light locker settings won't start even after bug 1559735 implementation

Bug #1607152 reported by Umar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
light-locker-settings (Ubuntu)
New
Undecided
Unassigned

Bug Description

I recently installed xubuntu 16.04 and i am a beginner in linux. I noticed when i press the Light Locker settings, the application doesn't start. Since I am new to this, I tried to search if there were any solution to the problem, but even after implementing the changes (from bug155935) there is something wrong in the code and i can't figure it out. Thats why i thought opening a bug is probably a good idea.

This is the piece from my light-locker-settings.py file (path: /usr/share/light-locker-settings/light-locker-settings/ ). This file is also attached to this bug.

def check_running_process(self, process_name):
        """Return True if the specified process is active."""
        # Find the process...
        # for pid in psutil_get_pids():
 for pid in psutill.pids():
            try:
                p = psutil.Process(pid)
                if self.get_process_username(p) == username:
                    # Return True if the process is found.
                    if self.get_process_name(p) == process_name:
                       return True
            except
                pass

 return False

when i type in terminal
$ light-locker-settings

I get this error
File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 226
    return True
SyntaxError: 'return' outside function

 I thought after implementing the changes from bug 1559735 this application would start working.

Please Help.

Revision history for this message
Umar (umarfq1996) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.