Merge lp://staging/~2xyo/indicator-brightness/trunk into lp://staging/indicator-brightness
Status: | Merged |
---|---|
Approved by: | Jan Simon |
Approved revision: | 3 |
Merged at revision: | 3 |
Proposed branch: | lp://staging/~2xyo/indicator-brightness/trunk |
Merge into: | lp://staging/indicator-brightness |
Diff against target: |
20 lines (+7/-3) 1 file modified
indicator-brightness.py (+7/-3) |
To merge this branch: | bzr merge lp://staging/~2xyo/indicator-brightness/trunk |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jan Simon | Approve | ||
Review via email:
|
Description of the change
Summary :
When "/usr/lib/
$ ./indicator-
** (gsd-backlight-
** (gsd-backlight-
Traceback (most recent call last):
File "./indicator-
create_
File "./indicator-
curr_brightness = get_curr_
File "./indicator-
curr_brightness = int(p.communica
ValueError: invalid literal for int() with base 10: '
Proposed fix :
Add a try/except bloc to handle warning message of "/usr/lib/
Implementation details :
def get_curr_
c = 0
try:
p = subprocess.
curr_brightness = int(p.communica
c = closest(
except:
c = 0
return brightness_
Tests :
./indicator-
Lint :
The change does not add errors to pychecker
Thanks for the commit!