def cli_db_params_from_dsn(dsn, user=None, database=None, port=None, host=None):
    'Convert DB-related command-line arguments from a DSN into a format appropriate for DIRBS CLI commands.'
    db_args = []
    db_args.append('--db-user={0}'.format((user if (user is not None) else dsn.get('user'))))
    db_args.append('--db-name={0}'.format((database if (database is not None) else dsn.get('database'))))
    db_args.append('--db-port={0}'.format((port if (port is not None) else dsn.get('port'))))
    db_args.append('--db-host={0}'.format((host if (host is not None) else dsn.get('host'))))
    return db_args
Convert DB-related command-line arguments from a DSN into a format appropriate for DIRBS CLI commands.
def cli_db_params_from_dsn(dsn, user=None, database=None, port=None, host=None):
    
    db_args = []
    db_args.append('--db-user={0}'.format((user if (user is not None) else dsn.get('user'))))
    db_args.append('--db-name={0}'.format((database if (database is not None) else dsn.get('database'))))
    db_args.append('--db-port={0}'.format((port if (port is not None) else dsn.get('port'))))
    db_args.append('--db-host={0}'.format((host if (host is not None) else dsn.get('host'))))
    return db_args