Work on scripts.

master
Dominik Deák 5 years ago
parent ac1c5e53c2
commit 888d446b31
No known key found for this signature in database
GPG Key ID: 85514EC0CCE7007C
  1. 14
      Scripts/Detail/Config.py

@ -54,27 +54,23 @@ class Configuration( configparser.ConfigParser ):
def validateConfigPaths( config ):
utility.printHeading( "Path configuration..." )
def resolvePath( config, name, mustExist = True ):
section = platform.system();
path = config[ section ][ name ]
if path != "":
path = utility.joinPath( config[ section ][ "toplevelPath" ], path )
utility.printItem( name + ": ", path )
if not os.path.exists( path ):
if mustExist:
utility.printError( "Required path does not exist:\n\t", path )
raise SystemExit( 1 )
else:
utility.printWarning( "Path does not exist:\n\t", path )
if not os.path.exists( path ) and mustExist:
utility.printError( "Required path does not exist:\n\t", path )
raise SystemExit( 1 )
config[ section ][ name ] = path
utility.printHeading( "Path configuration..." )
resolvePath( config, "synergyCorePath" )
resolvePath( config, "synergyBuildPath", mustExist = False )
resolvePath( config, "synergyVersionPath", mustExist = False )

Loading…
Cancel
Save