- Timestamp:
- 11/17/04 00:15:05 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/tool.py
r1923 r1932 22 22 # 23 23 # $Log$ 24 # Revision 1.142 2004/11/16 23:15:05 jalet 25 # Fix for LPRng job's file detection code 26 # 24 27 # Revision 1.141 2004/11/15 22:01:34 jalet 25 28 # Improved banner handling. … … 1350 1353 1351 1354 spooldir = os.environ.get("SPOOL_DIR", ".") 1352 try : 1353 df_name = [line[8:] for line in os.environ.get("HF", "").split() if line.startswith("df_name=")][0] 1354 except IndexError : 1355 try : 1356 cftransfername = [line[15:] for line in os.environ.get("HF", "").split() if line.startswith("cftransfername=")][0] 1355 df_name = os.environ.get("DATAFILES") 1356 if not df_name : 1357 try : 1358 df_name = [line[10:] for line in os.environ.get("HF", "").split() if line.startswith("datafiles=")][0] 1357 1359 except IndexError : 1358 try : 1359 df_name = [line[1:] for line in os.environ.get("CONTROL", "").split() if line.startswith("fdf") or line.startswith("Udf")][0] 1360 except IndexError : 1361 inputfile = None 1360 try : 1361 df_name = [line[8:] for line in os.environ.get("HF", "").split() if line.startswith("df_name=")][0] 1362 except IndexError : 1363 try : 1364 cftransfername = [line[15:] for line in os.environ.get("HF", "").split() if line.startswith("cftransfername=")][0] 1365 except IndexError : 1366 try : 1367 df_name = [line[1:] for line in os.environ.get("CONTROL", "").split() if line.startswith("fdf") or line.startswith("Udf")][0] 1368 except IndexError : 1369 raise PyKotaToolError, "Unable to find the file which holds the job's datas. Please file a bug report for PyKota." 1370 else : 1371 inputfile = os.path.join(spooldir, df_name) 1372 else : 1373 inputfile = os.path.join(spooldir, "d" + cftransfername[1:]) 1362 1374 else : 1363 1375 inputfile = os.path.join(spooldir, df_name) 1364 1376 else : 1365 inputfile = os.path.join(spooldir, "d" + cftransfername[1:])1377 inputfile = os.path.join(spooldir, df_name) 1366 1378 else : 1367 1379 inputfile = os.path.join(spooldir, df_name)