; and (B) in subsection (t)(7)(C), by inserting before the period at the end the following: , except that such term shall not include the use, distribution, possession, sale, or manufacture of marihuana (as such term is defined in section 102 of the Controlled Substances Act ( 21 U.S.C. 802 )) that is in compliance with the law of the State in which such use, distribution, possession, sale, or manufacture takes place . (3) Drug-related criminal activity defined In section 8(f)(5) ( 42 U.S.C. 1437f(f)(5) ), by inserting before the period at the end the following: , except that such term shall not include any such manufacture, sale, distribution, use, or possession of marihuana (as such term is defined in such section) that is in compliance with the law of the State in which such manufacture, sale, distribution, use, or possession takes place . 3. Amendments to Quality Housing and Work Responsibility Act of 1998 Subtitle F of title V of the Quality Housing and Work Responsibility Act of 1998 is amended— (1) in section 576 ( 42 U.S.C. 13661 )— (A) in subsection (b)— (i) in paragraph (1), by striking Notwithstanding and inserting Except as provided in paragraph (3) and notwithstanding ; (ii) in paragraph (2), by inserting other than the use of marihuana described in paragraph (3), after controlled substance each place such term appears; and (iii) by adding at the end the following new paragraph: (3) State law exception A public housing agency or an owner of federally assisted housing may not establish standards prohibiting admission to the program or federally assisted housing to any household with a member who engages in the use, distribution, possession, sale, or manufacture of marihuana (as defined in section 102 of the Controlled Substances Act ( 21 U.S.C. 802 )) in compliance with the law of the State in which such use, distribution, possession, sale, or manufacture takes place.