try:
    import glanceclient.client
    Client = glanceclient.client.Client
except ImportError:
    import warnings
    warnings.warn("Could not import glanceclient.client", ImportWarning)

from glanceclient.openstack.common import version as common_version

__version__ = common_version.VersionInfo('python-glanceclient')

try:
    import glanceclient.client
    Client = glanceclient.client.Client
except ImportError:
    import warnings
    warnings.warn("Could not import glanceclient.client", ImportWarning)

from glanceclient.openstack.common import version as common_version

#__version__ = common_version.VersionInfo('python-glanceclient')

version_info = common_version.VersionInfo('python-glanceclient')

try:
    __version__ = version_info.version_string()
except AttributeError:
    __version__ = None

Fix problem running glance --version
Fix problem running glance --version

__version__ should point to a string and not VersionInfo

Fixes LP# 1164760

Change-Id: I27d366af5ed89d0931ef46eb1507e6ba0eec0b6e

  try:
      import glanceclient.client
      Client = glanceclient.client.Client
  except ImportError:
      import warnings
      warnings.warn("Could not import glanceclient.client", ImportWarning)
  
  from glanceclient.openstack.common import version as common_version
  
- __version__ = common_version.VersionInfo('python-glanceclient')
+ #__version__ = common_version.VersionInfo('python-glanceclient')
  
+ version_info = common_version.VersionInfo('python-glanceclient')
+ 
+ try:
+     __version__ = version_info.version_string()
+ except AttributeError:
+     __version__ = None
+ 
Fix problem running glance --version
## Code Before:
try:
    import glanceclient.client
    Client = glanceclient.client.Client
except ImportError:
    import warnings
    warnings.warn("Could not import glanceclient.client", ImportWarning)

from glanceclient.openstack.common import version as common_version

__version__ = common_version.VersionInfo('python-glanceclient')

## Instruction:
Fix problem running glance --version
## Code After:
try:
    import glanceclient.client
    Client = glanceclient.client.Client
except ImportError:
    import warnings
    warnings.warn("Could not import glanceclient.client", ImportWarning)

from glanceclient.openstack.common import version as common_version

#__version__ = common_version.VersionInfo('python-glanceclient')

version_info = common_version.VersionInfo('python-glanceclient')

try:
    __version__ = version_info.version_string()
except AttributeError:
    __version__ = None
