A cannabis dealer who ran his business as a cottage industry has been warned he will go to jail if he is caught selling drugs again.
Andrew Saville's flat in Barnstaple was raided after police spotted two young customers hanging around a shop doorway while an older friend went up to conclude the deal.
The buyer was found with cannabis as he left the building and Saville was found with seven ready-for-sale wraps, some rolled joints, and £475 cash.
He also had 427 Valium tablets and told police he was making £70 to £80 a day from drug dealing but only had a small number of customers.
Saville, aged 53, of Silver Street, Barnstaple, admitted possession of class B Cannabis and class C Valium with intent to supply and was jailed for a year, suspended for two years, curfewed for six months and ordered to do 20 days of rehabilitation activities.
Judge Timothy Rose ordered the seizure of the cash and said the case was made more serious because Saville was caught doing exactly the same thing in 2013.
He told him: "You indicated to the police you were making quite a sum of money out of this. It is right to say the cannabis was only a few grams and this was something of a cottage industry.
"This is definitively your last chance. If you break this suspended sentence, you will go to prison. Even if that sentence is completed, if you do it again it will be impossible to avoid immediate imprisonment."
Felicity Payne, prosecuting, said Saville's home was raided in February last year after police spotted suspicious activity outside, including two people waiting in a doorway for a third to return from his flat with drugs.
He said he planned to use some of the 427 Valium tablets for himself and sell the rest for more than the £1 each that he paid for them.
Richard Crabb, defending, said Saville was operating on a very low level and using some of the drugs to treat his own anxiety and depression.
He has tackled his own drug use and sought more appropriate treatment for a range of debilitating mental and physical conditions.