On Wed, May 7, 2008 at 3:34 PM, Spencer Parker <[EMAIL PROTECTED]> wrote:
> I have a script that is just basically looking for a disk image in a
> directory...it lists all the directories in the main disk image directory
> then appends disk.img to the end to build the full file path.  I have one
> directory that holds old images in it for deletion at a later date.  This
> directory will never contain disk.img in there...it causes the script to
> error out since it didn't find that in there.  How can I exclude this
> directory from being listed?

I guess you want something like
        path = sys.argv[1] + '/' + i + '/disk.img'
        if not os.path.isfile(path):
            continue

Kent

PS it helps to give the actual error as well as the code.
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to