projects
/
platform
/
upstream
/
crda.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bdaebed
)
web: fix invalid country codes being passed
author
Johannes Berg
<johannes@sipsolutions.net>
Fri, 23 May 2008 12:51:07 +0000
(14:51 +0200)
committer
Johannes Berg
<johannes@sipsolutions.net>
Fri, 23 May 2008 12:51:07 +0000
(14:51 +0200)
web/Regulatory.py
patch
|
blob
|
history
diff --git
a/web/Regulatory.py
b/web/Regulatory.py
index
1c46b8f
..
d17a862
100644
(file)
--- a/
web/Regulatory.py
+++ b/
web/Regulatory.py
@@
-136,7
+136,10
@@
def macro_Regulatory(macro):
bpc = DBParser().parse(open(dbpath))
if country:
- return _country(macro, bpc, country)
+ try:
+ return _country(macro, bpc, country)
+ except KeyError:
+ return f.text('No such country code')
band, power, country = bpc
countries = country.keys()