system-config-printer: 1.3.12 -> 1 5.7

This commit is contained in:
Nikolay Amiantov
2016-01-17 14:54:28 +03:00
parent 47017474fd
commit 03353ce6ff
2 changed files with 38 additions and 6 deletions

View File

@@ -0,0 +1,17 @@
diff --git a/cupshelpers/config.py.in b/cupshelpers/config.py.in
index 55abbfc..1244327 100644
--- a/cupshelpers/config.py.in
+++ b/cupshelpers/config.py.in
@@ -22,3 +22,12 @@
prefix="@prefix@"
sysconfdir="@sysconfdir@"
cupsserverbindir="@cupsserverbindir@"
+
+try:
+ with open("/etc/cups/cups-files.conf") as config:
+ for cfgline in config:
+ args = cfgline.split(" ")
+ if len(args) == 2 and args[0] == "ServerBin":
+ cupsserverbindir = args[1].strip()
+except OSError:
+ pass