biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / misc / system-config-printer / detect_serverbindir.patch
blob2cd3058f233063a7d4ea002a06cfd60dc8758776
1 diff --git a/cupshelpers/config.py.in b/cupshelpers/config.py.in
2 index 55abbfc..1244327 100644
3 --- a/cupshelpers/config.py.in
4 +++ b/cupshelpers/config.py.in
5 @@ -22,3 +22,12 @@
6 prefix="@prefix@"
7 sysconfdir="@sysconfdir@"
8 cupsserverbindir="@cupsserverbindir@"
10 +try:
11 + with open("/etc/cups/cups-files.conf") as config:
12 + for cfgline in config:
13 + args = cfgline.split(" ")
14 + if len(args) == 2 and args[0] == "ServerBin":
15 + cupsserverbindir = args[1].strip()
16 +except OSError:
17 + pass