Permalink
Browse files

Now saving market URLs in the error bundle (bug 812624)

  • Loading branch information...
1 parent fd6d883 commit f50f53649a1424952387f53016bee07062bed9e4 @mattbasta committed Jan 18, 2013
Showing with 4 additions and 9 deletions.
  1. +2 −1 appvalidator/specs/webapps.py
  2. +2 −8 appvalidator/validate.py
View
3 appvalidator/specs/webapps.py
@@ -319,7 +319,8 @@ def process_iaf(self, node):
"`https://` to correct this issue.",
"Found: %s" % item,
self.MORE_INFO])
- elif item == "*" or item in constants.DEFAULT_WEBAPP_MRKT_URLS:
+ elif item == "*" or item in (self.err.get_resource("market_urls") or
+ constants.DEFAULT_WEBAPP_MRKT_URLS):
market_urls.add(item)
if self.err.get_resource("listed") and not market_urls:
View
10 appvalidator/validate.py
@@ -27,7 +27,7 @@ def validate_app(data, listed=True, market_urls=None):
bundle = ErrorBundle(listed=listed)
# Set the market URLs.
- set_market_urls(market_urls)
+ bundle.save_resource("market_urls", market_urls)
webapp.detect_webapp_string(bundle, data)
return format_result(bundle, "json")
@@ -60,7 +60,7 @@ def validate_packaged_app(path, listed=True, format="json", market_urls=None,
bundle.save_resource("packaged", True)
# Set the market URLs.
- set_market_urls(market_urls)
+ bundle.save_resource("market_urls", market_urls)
submain.prepare_package(bundle, path, timeout)
return format_result(bundle, format)
@@ -73,9 +73,3 @@ def format_result(bundle, format):
return formats[format](bundle)
else:
return bundle
-
-
-def set_market_urls(market_urls=None):
- if market_urls is not None:
- constants.DEFAULT_WEBAPP_MRKT_URLS = market_urls
-

0 comments on commit f50f536

Please sign in to comment.