The secant function has a discontinuity at $\pi/2$, so I separated the integral as:
$\int_0^{\pi}{\sec(\theta) d\theta} = \int_0^{\pi/2}{\sec(\theta) d\theta} + \int_{\pi/2}^{\pi}{\sec(\theta) d\theta}.$
Computing these improper integrals as a limit, we obtain:
$\int_0^{\pi/2}{\sec(\theta) d\theta} = +\infty,$
$\int_{\pi/2}^{\pi}{\sec(\theta) d\theta} = -\infty$.
Is the original integral convergent or divergent?
The original integral diverges. If we have a function $f\colon[a,b]\setminus\{c\}\longrightarrow\Bbb R$ (with $a,b,c\in\Bbb R$ and $a<c<b$) then we say that the improper integral $\int_a^bf(x)\,\mathrm dx$ converges when both integrals $\int_a^cf(x)\,\mathrm dx$ and $\int_c^bf(x)\,\mathrm dx$ converge. In this case, they both diverge.