Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python
Capture DOS error???
 

Index | Next | Previous | View Flat


scook at elp

Jun 18, 2003, 10:41 PM


Views: 52
Permalink
Capture DOS error???

I'm writing a script which at some point will map to a list of servers. The
program will be keeping a log of problems it encounters to be reviewed
later. To map the drive, I am using:

sDrive =
["B","F","G","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X"
,"Y","Z"]
iIndex = 0
shellCmd = ""
for s in sImage: # list of servers
shellCmd = "map " + sDrive[iIndex] + ":=" + s
iIndex=iIndex + 1
os.system(shellCmd)

My question is this...Is there a way to capture the DOS error it would
display if it had a problem mapping the server? I want to detect the
exception if there is one and write it to the log file. I have tried using
OSError, SystemError, and StandardError without success. I'm not
necessarily looking for someone to write the code for me as much as pointing
me in the right direction.

Thanks,

Subject User Time
Capture DOS error??? scook at elp Jun 18, 2003, 10:41 PM
    Capture DOS error??? syver at inout Jun 19, 2003, 3:29 AM
        Capture DOS error??? scook at elp Jun 19, 2003, 8:04 PM
        Re: Capture DOS error??? jkugler at bigfoot Dec 6, 2007, 11:59 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.