Skip to content

Commit

Permalink
Now saving market URLs in the error bundle (bug 812624)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbasta committed Jan 18, 2013
1 parent fd6d883 commit f50f536
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
3 changes: 2 additions & 1 deletion appvalidator/specs/webapps.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ def process_iaf(self, node):
"`https://` to correct this issue.", "`https://` to correct this issue.",
"Found: %s" % item, "Found: %s" % item,
self.MORE_INFO]) 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) market_urls.add(item)


if self.err.get_resource("listed") and not market_urls: if self.err.get_resource("listed") and not market_urls:
Expand Down
10 changes: 2 additions & 8 deletions appvalidator/validate.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def validate_app(data, listed=True, market_urls=None):
bundle = ErrorBundle(listed=listed) bundle = ErrorBundle(listed=listed)


# Set the market URLs. # Set the market URLs.
set_market_urls(market_urls) bundle.save_resource("market_urls", market_urls)


webapp.detect_webapp_string(bundle, data) webapp.detect_webapp_string(bundle, data)
return format_result(bundle, "json") return format_result(bundle, "json")
Expand Down Expand Up @@ -60,7 +60,7 @@ def validate_packaged_app(path, listed=True, format="json", market_urls=None,
bundle.save_resource("packaged", True) bundle.save_resource("packaged", True)


# Set the market URLs. # Set the market URLs.
set_market_urls(market_urls) bundle.save_resource("market_urls", market_urls)


submain.prepare_package(bundle, path, timeout) submain.prepare_package(bundle, path, timeout)
return format_result(bundle, format) return format_result(bundle, format)
Expand All @@ -73,9 +73,3 @@ def format_result(bundle, format):
return formats[format](bundle) return formats[format](bundle)
else: else:
return bundle 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.