Hey folks, On 21 July 2010 10:37, Greg Ewing <greg.ew...@canterbury.ac.nz> wrote: > Steven D'Aprano wrote: >> >> Perhaps all we need is a recipe in the docs: >> >> try: >> os.makedirs(path) >> except OSError, e: >> if e.errno != 17: >> raise > > I don't like writing code that depends on particular > errno values, because I don't trust it to work cross- > platform.
I use errno.EEXIST instead of a magic number. later, -- Clinton Roy Software Engineer Global Change Institute University of Queensland humbug.org.au - Brisbane Unix Group clintonroy.wordpress.com - Blog flickr.com/photos/croy/ - Photos _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com