Do you mean the err variable? That's just making sure that the FSM was able to connect to the "finished" signal emitted by its children (I guess this particular implementation makes each individual state a child of the FSM).
The connect() function returns an error code to tell whether the connection was successful. The error code is an enumerated type, with 0 meaning OK, as in nothing went wrong. (See here for info on Error codes) So when nothing went wrong, the print statement will be skipped ("if err:" means the same thing as "if err !=0:")
In case you're asking about the purpose of connecting in the first place, you're basically saying that every time one of the children calls emitsignal("finished"), you want the FSM to call its function _changestate in response to that signal. Now the state can let the FSM (or anything else that connects to that signal) know that its time to change. And better yet, the state can blindly emit these signals without caring about who the receivers will be.