Kevin McKell, from Dundee, had returned from a visit to Bavaria when his suitcase set off alarms going through an X-Ray machine.
McKell, 31. told security staff that he had a knuckle duster and a knife.
But a check revealed three CS gas canisters, seven knives and 10 knuckledusters.
Edinburgh Sheriff Court was told that the items were "readily available" in Bavaria and that McKell was bringing them back for friends.
McKell admitted possessing the weapons without reasonable excuse or lawful authority at Edinburgh Airport on 1 June last year.

A first-half own goal from Diego Reyes was followed by Saul Niguez's acrobatic volley and Antoine Griezmann's penalty in the second half.
Barca can restore their eight-point advantage and set a Spanish football record of 35 games unbeaten if they win at Rayo Vallecano on Thursday.
Third-placed Real Madrid travel to Levante on Wednesday.

Two cars and a lorry were involved in the collision on the A52 near Nottingham on 25 November.
Father-of-three Gurdip Singh Kareer, 41, from Wollaton, was a "loving, caring family man", while Kyle O'Connor, 22, of Wollaton Vale, Nottingham, "loved everything".
Two men, aged 22 and 24, have been arrested and bailed over the crash.
The family of Mr Kareer said: "He was a loving, caring family man that always put his wife and three children Kaiden, nine , Argent, four and Tiana, 11 months, first before anything else.
"He doted on his family and everything he did was for his family. He was a loving brother, a caring son and will be very sadly missed forever - but never forgotten."
Mr O'Connor's family described him as a loving and adventurous man
"Kyle was a loved brother, son, grandson, nephew and best friend.
"Kyle loved everything and everyone around him, behind his fearlessness, strength, sense of fun and adventure, which we will hold in our hearts forever.
"As a family we would like to thank everyone who has shown love and support," they said.
There were lane closures on the road for nearly 24 hours after the accident.
Police have renewed an appeal for any witnesses and particularly dashcam footage from any vehicles which were near the scene at the time of the crash.

The much-anticipated film sparked controversy last week after it emerged it would feature a "gay moment".
It was due for release in Malaysia on Thursday, but Disney said it was being held for a "review" of its content.
The Malaysian Censorship Board (LPF) said on Tuesday it had approved the screening but with "a minor edit concerning a gay moment in the film".
Homosexual activity is illegal in Muslim majority Malaysia, although the country's tourism minister has said banning the film is "ridiculous".
A new release date has yet to be announced.   The live-action remake was granted a "P13 parental guidance classification".
"We have approved the film so there is no more issue. Once a film receives approval, it means it can be screened," LPF Chairman Datuk Abdul Hamid said.
"However, the date of screening and where the screening takes place is not under LPF's jurisdiction. We only look at the content and give a decision on whether the movie gets approved or not."
Local cinema chains have been offering refunds for customers who have purchased tickets in advance.
Beauty and the Beast director Bill Condon has spoken about the "exclusively gay moment" in the film.
It involves LeFou - the sidekick of the film's main antagonist Gaston - who tries to come to terms with feelings for Gaston that swing between lust and admiration, as a side-plot to the main story.
The decision to review the Disney classic in Malaysia courted criticism from netizens, many of whom called it "stupid and laughable".
"Malaysia bans 'Beauty and the Beast' but is okay with nonsense Malay movies with no moral values, just full of brainless jokes," wrote a Twitter user in a tweet which drew more than 4,500 re-tweets.
Priyanka Laxmiâ€
A man caught at Edinburgh Airport with knives, knuckledusters and CS gas canisters in his luggage has been jailed for three years.
[NEXT_CONCEPT]
Atletico Madrid easily beat Real Sociedad to close the gap on La Liga leaders Barcelona to five points.
[NEXT_CONCEPT]
Tributes have been paid to the two men who died in a crash which closed a major road in the East Midlands.
[NEXT_CONCEPT]
The release of Disney's Beauty and the Beast has been postponed in Malaysia.