From f28a8499ddb92d24e84b5688ed992b5df4d7ad0b Mon Sep 17 00:00:00 2001 From: Timothee 'TTimo' Besset Date: Sun, 25 Dec 2022 20:00:09 -0700 Subject: [PATCH] fix config.py unit tests - the target parsing was broken (yes, there are even unit tests!) --- config.py | 4 +++- install.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index f6f11424..b85cbffc 100644 --- a/config.py +++ b/config.py @@ -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] ) ) diff --git a/install.py b/install.py index 1dd3e0d8..f1570f5a 100644 --- a/install.py +++ b/install.py @@ -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] )