comparison mercurial/util.py @ 4017:ea6174c96ae1

catch AttributeError in util.checklink There's no symlink function in the os module on windows. Fixes issue468
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Fri, 05 Jan 2007 00:01:51 -0200
parents d7b9ec589546
children 431f3c1d3a37
comparison
equal deleted inserted replaced
4016:a195f11ed1a2 4017:ea6174c96ae1
720 name = tempfile.mktemp(dir=path) 720 name = tempfile.mktemp(dir=path)
721 try: 721 try:
722 os.symlink(".", name) 722 os.symlink(".", name)
723 os.unlink(name) 723 os.unlink(name)
724 return True 724 return True
725 except OSError: 725 except (OSError, AttributeError):
726 return False 726 return False
727 727
728 def linkfunc(path, fallback): 728 def linkfunc(path, fallback):
729 '''return an is_link() function with default to fallback''' 729 '''return an is_link() function with default to fallback'''
730 if checklink(path): 730 if checklink(path):