Yes, it is divergent. However, using the indefinite integral to establish this is not recommended. This is because in most cases, the indefinite integral cannot be expressed in terms of elementary functions.
You need to consider first if the integral might be divergent at some of the limits, and then you prove whether it actally is divergent or convergent.
In this case, you can see that near the upper limit of pi, the integrand
1/sin(x) behaves as 1/(pi-x). More precisely, for any interval containg pi, there exists a constant A such that
|1/sin(x) - 1/(pi-x)| < A|pi-x|
This you can obtain from the Taylor expansion of sin(x) around x = pi with the error term. Then this implies that is you subtract
1/(pi-x) from 1/sin(x), the integral will be convergent. You can then easily prove that divergence of the integral of 1/(pi-x) then implies that the integral of 1/sin(x) must also be divergent.