diff --git a/test/module/net_sql.mysql.skipcond b/test/module/net_sql.mysql.skipcond index d130e5e3c8429074e5d32c0582f7c73d50606ffd..098aef0ccff8c2a82336c8918b0e022795db4574 100644 --- a/test/module/net_sql.mysql.skipcond +++ b/test/module/net_sql.mysql.skipcond @@ -5,7 +5,7 @@ import os try: (host, port, user, password, db) = os.getenv('MYSQL').split(':') for val in (host, port, user, password, db): - if val == '': + if not val or val == ' ': raise ValueError('Empty value') if not os.path.exists(os.path.join(self.args.builddir, 'src/module/mysql/mysql.so')): raise RuntimeError('No MySQL module found') diff --git a/test/module/net_sql.pg.skipcond b/test/module/net_sql.pg.skipcond index 59742b47ffdda03c13ce093855100b5963c47ff9..b0398c63b2b96493428c54b77aa9d43e27b92883 100644 --- a/test/module/net_sql.pg.skipcond +++ b/test/module/net_sql.pg.skipcond @@ -5,7 +5,7 @@ import os try: (host, port, user, password, db) = os.getenv('PG').split(':') for val in (host, port, user, password, db): - if val == '' : + if not val or val == ' ': raise ValueError ('Empty value') if not os.path.exists(os.path.join(self.args.builddir, 'src/module/pg/pg.so')): raise RuntimeError('No PG module found')