It is known that the $G$-principal bundle on the sphere $S^{n+1}$, $P(G,S^{n+1})$, has a one-to-one correspondence with the homotopy group $\pi_{n}(G)$. In other words, $P(G,S^{n+1})$ can be classified by its transition function on the equator $S^n$.
My question is that whether such clutching-construction argument can be generalized to the two-dimensional torus $T^2$. More specifically, we can split $T^2$ into $T^2=A\cup B$ with $A\cap B=S^1$. Then could we say that $P(G,T^2)$ has a one-to-one correspondence with $\pi_1(G)$? (Steenrod's approach does not work here since $A$ and $B$ may not be both contractible) If the answer is yes, whether we could generalize the argument towards general two-dimensional orientable manifolds?