[9402] in athena10
Re: [Debathena] #1032: printing-config's clusterinfo lookup
daemon@ATHENA.MIT.EDU (Debathena Trac)
Sun Jul 8 21:13:41 2012
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
From: "Debathena Trac" <debathena@MIT.EDU>
Cc: debathena@MIT.EDU
To: jdreed@MIT.EDU
Date: Mon, 09 Jul 2012 01:13:36 -0000
Reply-To:
Message-ID: <057.6e91bb2e258e1ceabdd59c6c13472975@mit.edu>
In-Reply-To: <042.728e3f689fd32345693c1a3bad770a95@mit.edu>
Content-Transfer-Encoding: 8bit
#1032: printing-config's clusterinfo lookup bypasses local clusterinfo
--------------------+--------------------------------
Reporter: jdreed | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Precise Release
Component: -- | Resolution:
Keywords: | Upstream bug:
--------------------+--------------------------------
Changes (by jdreed):
* milestone: The Distant Future => Precise Release
Comment:
How Wrong(tm) is this?
{{{
--- common.py (revision 25590)
+++ common.py (working copy)
@@ -8,7 +8,7 @@
import urllib
import string
import re
-
+import subprocess
import cups
import hesiod
@@ -153,12 +153,25 @@
if default:
return default
- for result in _hesiod_lookup(socket.getfqdn(), 'cluster'):
- key, value = result.split(None, 1)
- if key == 'lpr':
- return value
+ hesprinter = subprocess.Popen("eval $(getcluster -b $(lsb_release
-sr)) && echo $LPR", stdout=subprocess.PIPE, shell=True).communicate()[0]
+ if hesprinter:
+ return hesprinter.strip()
}}}
--
Ticket URL: <http://athena10.mit.edu/trac/ticket/1032#comment:1>
Debathena <http://debathena.mit.edu>
MIT Debathena Project