> > On Mon, 2011-02-07 at 09:43 +0000, James Harper wrote: > > I think target isn't always a file. It can be a scsi ID like 0:1:2:3. > > I think it can be other types of specifier too. > > OK. So perhaps: > > if os.path.islink(target): > target = os.path.realpath(target) > I guess. I know it's a long shot but what if there was a symlink called 0:1:2:3? While that is unlikely, there might be other incantations used by vscsi that could ambiguously be the filename of a symlink or not. I'd be happier if realpath was only used if an absolute path was specified. Who's going to want to specify a relative path anyway... what would it be relative to? James