pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

qtile: Don't assume sysfs is there.



Module Name:	pkgsrc-wip
Committed By:	Nia Alarie <nia.alarie%gmail.com@localhost>
Pushed By:	nee
Date:		Sat May 19 16:21:29 2018 +0100
Changeset:	0387454ab586e8704e0fd7dd062b05b58a8deae3

Modified Files:
	qtile/distinfo
Added Files:
	qtile/patches/patch-libqtile_widget_battery.py

Log Message:
qtile: Don't assume sysfs is there.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=0387454ab586e8704e0fd7dd062b05b58a8deae3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 qtile/distinfo                                 |  1 +
 qtile/patches/patch-libqtile_widget_battery.py | 24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+)

diffs:
diff --git a/qtile/distinfo b/qtile/distinfo
index e9c24f1010..f0e0455651 100644
--- a/qtile/distinfo
+++ b/qtile/distinfo
@@ -4,4 +4,5 @@ SHA1 (qtile-0.11.1.tar.gz) = 296f41513cfa3cce949ce7a0830e54b1ee56e5e4
 RMD160 (qtile-0.11.1.tar.gz) = 1b71498ba6adf008bc02fb994f6e25b4c26941fa
 SHA512 (qtile-0.11.1.tar.gz) = 9cc2cdf5a01495c680fae62d23348d68cca456ce2c31848bef23825c943a5e8aebcc3ea70879388af06d222ab703dd410db14e6a9bd4180d90f57651b9dbaed5
 Size (qtile-0.11.1.tar.gz) = 442026 bytes
+SHA1 (patch-libqtile_widget_battery.py) = ddb56efdd1e9748cfa7dca436ad605ae0fb5cdb9
 SHA1 (patch-setup.py) = a00b26ba5e8114307e55c5e5328681039fd94df4
diff --git a/qtile/patches/patch-libqtile_widget_battery.py b/qtile/patches/patch-libqtile_widget_battery.py
new file mode 100644
index 0000000000..d3e3b444ab
--- /dev/null
+++ b/qtile/patches/patch-libqtile_widget_battery.py
@@ -0,0 +1,24 @@
+$NetBSD$
+
+Don't assume sysfs is present.
+
+--- libqtile/widget/battery.py.orig	2018-03-01 13:31:23.000000000 +0000
++++ libqtile/widget/battery.py
+@@ -63,12 +63,11 @@ class _Battery(base._TextBox):
+     filenames = {}
+ 
+     def _get_battery_name():
+-        bats = [f for f in os.listdir(BAT_DIR) if f.startswith('BAT')]
+-
+-        if bats:
+-            return bats[0]
+-        else:
+-            return 'BAT0'
++        if os.path.isfile(BAT_DIR):
++            bats = [f for f in os.listdir(BAT_DIR) if f.startswith('BAT')]
++            if bats:
++                return bats[0]
++        return 'BAT0'
+ 
+     defaults = [
+         ('battery_name', _get_battery_name(), 'ACPI name of a battery, usually BAT0'),


Home | Main Index | Thread Index | Old Index