def format_version(module, attr, call=False):
 try:
  if call:
   version = getattr(module, attr)()
  else:
   version = getattr(module, attr)
 except Exception as e:
  print e
  version = 'Version could not be acquired!'
 if (not isinstance(version, str)):
  version = list2string(version)
 return version

def format_version ( module , attr , call = False ) : try : if call : version = getattr ( module , attr ) ( ) else : version = getattr ( module , attr ) except Exception as e : print e version = 'Version could not be acquired!' if ( not isinstance ( version , str ) ) : version = list2string ( version ) return version
format the version .