A would-be burglar was caught red-handed as he attempted to break into a house in the middle of the night, Lincoln Crown Court was told.
James Smith disturbed the occupants of the property in St Johns Terrace, Gainsborough, as he tried to remove the beading from a window.
Andrew Scott, prosecuting, said one of the occupants was downstairs watching a film of television but was listening to the sound through headphones and only realised what was happening when his wife was woken at 1 am by the noise of Smith trying to break in.
The woman went downstairs and alerted her husband who pulled open the curtains to see a man crouched down outside.
Mr Scott said that the householder shouted at the intruder and then gave chase but was unable to catch him.
Police found blood stains on the window frame.
Tests showed that the blood contained Smith’s DNA and he was subsequently arrested.
Mr Scott said that at the time Smith was on police bail as well as a night-time curfew following an earlier incident in which he smashed the window of a car parked in Bacon Street, Gainsborough, and stole a wallet containing bank cards.
Smith then used one of the bank cards to withdraw £200 from the cash machine at the Tesco store in Beaumont Street in the town.
He was identified as responsible after he was caught on CCTV using the card.
Smith said he could not remember the attempted burglary but confessed to the Bacon Street offences saying he used the money to repay a drug debt.
The court heard that Smith 41 previous convictions involving a total of 77 offences.
Smith, 45, of Waterworks Street, Gainsborough, admitted attempted burglary of the property in St John’s Terrace on 23rd October.
He also admitted two charges of theft arising out of the incident in Bacon Street.
Judge Stuart Rafferty QC jailed Smith for 15 months.
David Eager, defending, said Smith has sought help to deal with his drug problem.
He said: “He has now been getting some counselling and he is benefitting from that.”