A man has been jailed for more than a year after he left a house in Port Glasgow in possession of a kitchen knife.