Skip to content

Commit

Permalink
Merge pull request #112 from richrd/dev
Browse files Browse the repository at this point in the history
Merge version 0.1.44 from dev to master
  • Loading branch information
richrd committed Jan 27, 2016
2 parents b3abdb8 + e2729d2 commit 4f9c563
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
import re
# from distutils.core import setup
from setuptools import setup

version = re.search(
Expand Down
3 changes: 2 additions & 1 deletion suplemon/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
The main class that starts and runs Suplemon.
"""

__version__ = "0.1.43"

import os
import sys
Expand All @@ -19,6 +18,8 @@
from .config import Config
from .editor import Editor

__version__ = "0.1.44"


class App:
def __init__(self, filenames=None, config_file=None):
Expand Down
5 changes: 4 additions & 1 deletion suplemon/modules/battery.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- encoding: utf-8

import os
import time
import subprocess

Expand Down Expand Up @@ -71,7 +72,8 @@ def battery_status_read(self):
def battery_status_acpi(self):
"""Get the battery status via acpi."""
try:
raw_str = subprocess.check_output(["acpi"])
FNULL = open(os.devnull, "w")
raw_str = subprocess.check_output(["acpi"], stdout=FNULL, stderr=FNULL)
except:
return None
raw_str = raw_str.decode("utf-8")
Expand All @@ -91,6 +93,7 @@ def battery_status_upower(self):
except:
return None
raw_str = raw_str.decode("utf-8")
raw_str = raw_str.splitlines()[0]
part = helpers.get_string_between("percentage:", "%", raw_str)
if part:
try:
Expand Down

0 comments on commit 4f9c563

Please sign in to comment.