Add error checking to get_terminal_size.
Add error checking to get_terminal_size.

Adds returncode error checking to get_terminal_size so that
it doesn't spew errors to console when running glance commands
in a shell without a TTY.

Fixes LP Bug #956202.

Change-Id: I42e155d168da1f4f25c0dea9ad9768686bd654ce

redhat-openstack/glance,saeki-masaki/glance,darren-wang/gl,dims/glance,vuntz/glance,akash1808/glance,ozamiatin/glance,kfwang/Glance-OVA-OVF,takeshineshiro/glance,citrix-openstack-build/glance,tanglei528/glance,takeshineshiro/glance,openstack/glance,klmitch/glance,klmitch/glance,ntt-sic/glance,vuntz/glance,darren-wang/gl,dims/glance,cloudbau/glance,paramite/glance,tanglei528/glance,rajalokan/glance,scripnichenko/glance,redhat-openstack/glance,stevelle/glance,stevelle/glance,rajalokan/glance,scripnichenko/glance,cloudbau/glance,openstack/glance,rickerc/glance_audit,jumpstarter-io/glance,SUSE-Cloud/glance,sigmavirus24/glance,saeki-masaki/glance,JioCloud/glance,SUSE-Cloud/glance,paramite/glance,citrix-openstack-build/glance,openstack/glance,kfwang/Glance-OVA-OVF,wkoathp/glance,ntt-sic/glance,rickerc/glance_audit,JioCloud/glance,jumpstarter-io/glance,sigmavirus24/glance,wkoathp/glance,akash1808/glance,ozamiatin/glance