fix config.py unit tests - the target parsing was broken (yes, there are even unit tests!)

This commit is contained in:
Timothee 'TTimo' Besset 2022-12-25 20:00:09 -07:00
parent 6be32bdeec
commit f28a8499dd
2 changed files with 4 additions and 2 deletions

View File

@ -493,7 +493,9 @@ class ConfigParser:
value_split.reverse()
value_split.pop()
while ( len( value_split ) != 0 ):
value_array.append( value_split.pop() )
v = value_split.pop()
if ( len(v) > 0 ):
value_array.append( v )
value_split.pop()
except:
print( traceback.print_exception( sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2] ) )

View File

@ -43,6 +43,6 @@ def install( path, src_path ):
if __name__ == '__main__':
if ( len( sys.argv ) <= 2 or not os.path.exists( sys.argv[1] ) or not os.path.exists( sys.argv[2] ) ):
print('usage: install [target directory] [source directory]')
sys.exit(1)
sys.exit(1)
print('Install %s into %s' % ( sys.argv[2], sys.argv[1] ))
install( sys.argv[1], sys.argv[2] )