
128 Cal.App.2d 824 (1954)
CHARLOTTE P. ROSE, Respondent,
v.
B. E. LONG, Appellant.
Civ. No. 5014. 
California Court of Appeals. Fourth Dist.  
Nov. 17, 1954.
 Powell & Banyard for Appellant.
 Blau, Shaw & Miller for Respondent.
 BARNARD, P. J.
 On September 20, 1951, the plaintiff leased to the defendant a one-story brick and steel building for use as a warehouse for the storage of personal property. The term of the lease was three years and the rental was payable monthly. The lease provided, among other things, that it was understood that the building was not in first-class *825 repair and "that lessee takes said premises as is"; that the lessor should not be obligated to make or pay for any repairs or alterations of any kind whatsoever; and that "the lessee will, at his sole cost and expense, faithfully observe in the use of the premises, all municipal regulations and statutes now in force or which may hereafter be in force."
 On June 24, 1952, the Building Department of Orange County posted a notice on the leased property which stated that "This building is deemed unsafe for human occupancy," under a section of the county building code, and that "It is unlawful for any person to occupy or reside in this building." About the same time the county building department served a notice on the plaintiff purporting to require that certain repairs or improvements be commenced within 30 days and be completed within 90 days.
 The suggested repairs were not made, and the plaintiff informed the defendant that it was her contention that the county had no authority to post such a notice, and that she would hold the defendant to the lease until such time as it was judicially decided that he must vacate. The head of the county building department testified that no eviction notice was ever served. On June 27, 1952, the defendant paid the rent for the period of June 20 to July 20. On August 19, 1952, defendant's counsel wrote a letter to the plaintiff stating that it was his understanding that the plaintiff was obligated to correct the condition that existed, and that he had instructed the defendant to remove from the premises immediately, and make no further rent payments. It is conceded that no further steps were taken by the county building department pursuant to this notice, and that no attempt was made by the defendant to secure a variance from the building department or to seek a judicial determination of his right to continue to occupy the premises.
 By her complaint in this action the plaintiff sought to recover the rental called for by the lease for the months of July, August, September and October, 1952. In his answer the defendant set up the notice which had been posted on the premises by the county building department, and alleged that the plaintiff had failed and refused to correct the existing condition within the time required by law. The court found, among other things, that all of the allegations of the complaint are true; that after this notice was posted on the leased property the plaintiff protested to the building department *826 that said premises were not unsafe; that no action was ever commenced by the building department or any county agency to secure a judicial determination as to the condition of the leased premises; that it has not been established that there was any condition which rendered said premises unsafe; that neither plaintiff nor defendant made any repairs to said property; that the defendant made no attempt to secure a variance from the building department which would have permitted him to occupy the building without making repairs; that the defendant made no attempt to secure a judicial determination of his right to continue to occupy the premises in their then condition, and did not take any other affirmative action to secure to himself the continued use of said premises; that the defendant began to remove his goods from the premises during the latter part of August, and that by the middle of September, 1952, he had abandoned the premises; and that when he abandoned the premises he believed the premises to be adequate for his needs but he moved therefrom because he thought it was illegal for him to continue to use the property. As conclusions of law, it was found that the plaintiff was not obligated to make any repairs, that the defendant accepted the premises "as is" and the burden was on him to make any repairs that were necessary in order for him to have the use of the property, and that there was no failure of consideration with respect to the lease. Judgment was entered for the plaintiff, and the defendant appealed.
 [1a] Appellant's sole contention is that this lease was terminated by operation of law. It is argued that the appellant was duly notified that it was unlawful to occupy or reside in this building; that section 1511 of the Civil Code provides that the want of performance of an obligation is excused when such performance is prevented by operation of law; and that this code section relieved the appellant from any obligation to make repairs which was otherwise imposed upon him by the terms of the lease. The appellant relies on Collins Hotel Co. v. Collins, 4 Cal.App. 379 [88 P. 292], where it was held that the defendant was excused, by operation of law, for the nonperformance of a contract to build a building of a height greater than that permitted by a city ordinance.
 In the case just cited, the contract was void from the beginning since it could not legally be performed. No such situation here appears, and this contract could be and was legally performed for many months. A question of compliance *827 with a municipal regulation then arose. By the terms of this lease the appellant assumed the burden of making any repairs needed and expressly agreed that he would, at his own expense, comply with all municipal regulations concerning the use of the premises. The repairs suggested by the county authorities, assuming this requirement to be enforceable, would have added to the appellant's expense but this would not have made it impossible to comply with the lease agreement. [2] Laws or other governmental acts that make performance unprofitable or more expensive do not excuse the duty to perform a contractual obligation. (Lloyd v. Murphy, 25 Cal.2d 48 [153 P.2d 47].) [1b] A further consideration is that it had not been established that any condition existed here which rendered the leased premises unsafe. While the posted notice expressed the opinion of one building official that the building was unsafe, the appellant considered the building safe for his purposes, as shown by his own testimony. Without taking any steps to test his right to occupy the building by administrative proceedings or by some form of court action, without waiting to see whether the proposed ban on use could or would be enforced, and without making the repairs at his own expense he abandoned the premises. The record fails to support appellant's contention that he was prevented by operation of law from performing his contract, and supports the court's conclusion that the respondent was not estopped from claiming the rent for the period here in question.
 The judgment is affirmed.
 Griffin, J., and Mussell, J., concurred.
