def get_sw_version(strip_build_num=False):
 try:
  from freenasOS import Configuration
 except ImportError:
  Configuration = None
 global _VERSION
 if (_VERSION is None):
  if Configuration:
   conf = Configuration.Configuration()
   sys_mani = conf.SystemManifest()
   if sys_mani:
    _VERSION = sys_mani.Sequence()
  if (_VERSION is None):
   with open(VERSION_FILE) as fd:
    _VERSION = fd.read().strip()
 if strip_build_num:
  return _VERSION.split(' ')[0]
 return _VERSION

def get_sw_version ( strip_build_num = False ) : try : from freenasOS import Configuration except ImportError : Configuration = None global _VERSION if ( _VERSION is None ) : if Configuration : conf = Configuration . Configuration ( ) sys_mani = conf . SystemManifest ( ) if sys_mani : _VERSION = sys_mani . Sequence ( ) if ( _VERSION is None ) : with open ( VERSION_FILE ) as fd : _VERSION = fd . read ( ) . strip ( ) if strip_build_num : return _VERSION . split ( ' ' ) [ 0 ] return _VERSION
return the full version string .