Update link.py

Sorry for the error at the crucial place in the code. It must be self.is_knot as we are looking for the input on the knot as of now.