I've solved my problem with this:
Code:
vec1.rotate(1,0,0,'',viz.RELATIVE_LOCAL)
This works fine, but I want to set the rotation point of my object at the first vertex.
So the first vertex should be fixed and the second one should rotate around this first one.
Currently my object rotates both vertex and the rotation point seems to be in the middle of the line.