Changeset 1850 for pykota/trunk
- Timestamp:
- 10/20/04 00:24:00 (20 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/NEWS
r1848 r1850 24 24 - 1.20alpha26 : 25 25 26 - LPRng support code should now better detect network 27 printers' hostnames or IP addresses. 28 26 29 - Fix for recently introduced bug in LPRng support. 27 30 -
pykota/trunk/pykota/tool.py
r1849 r1850 22 22 # 23 23 # $Log$ 24 # Revision 1.133 2004/10/19 22:24:00 jalet 25 # Should fix the printer's hostname or IP address detection code. 26 # 24 27 # Revision 1.132 2004/10/19 21:45:25 jalet 25 28 # Now correctly logs command line arguments … … 1237 1240 Kseen = 1 # we assume the user wants at least one copy... 1238 1241 if (rseen is None) and jseen and Pseen and nseen : 1239 self.printInfo(_("Printer hostname undefined, set to 'localhost'"), "warn") 1240 rseen = "localhost" 1242 lparg = [arg for arg in "".join(os.environ.get("PRINTCAP_ENTRY", "").split()).split(":") if arg.startswith("rm=") or arg.startswith("lp=")] 1243 try : 1244 rseen = lparg[0].split("=")[-1].split("@")[-1].split("%")[0] 1245 except : 1246 # Not found 1247 self.printInfo(_("Printer hostname undefined, set to 'localhost'"), "warn") 1248 rseen = "localhost" 1241 1249 1242 1250 spooldir = os.environ.get("SPOOL_DIR", ".")