Browse Source

Support for closed or private wikis where we can't create an account.

pull/24/head
Ben Kurtovic 12 years ago
parent
commit
1368a19a19
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      pages/copyvios.mako

+ 3
- 3
pages/copyvios.mako View File

@@ -48,14 +48,14 @@
except exceptions.SiteNotFoundError: except exceptions.SiteNotFoundError:
try: try:
return bot.wiki.add_site(lang=lang, project=project) return bot.wiki.add_site(lang=lang, project=project)
except exceptions.APIError:
except (exceptions.APIError, exceptions.LoginError):
return None return None
try: try:
return bot.wiki.get_site(lang=lang, project=project) return bot.wiki.get_site(lang=lang, project=project)
except exceptions.SiteNotFoundError: except exceptions.SiteNotFoundError:
try: try:
return bot.wiki.add_site(lang=lang, project=project) return bot.wiki.add_site(lang=lang, project=project)
except exceptions.APIError:
except (exceptions.APIError, exceptions.LoginError):
return None return None


def get_url_specific_results(page, url): def get_url_specific_results(page, url):
@@ -374,7 +374,7 @@
% if project and lang and title and not page: % if project and lang and title and not page:
<div class="divider"></div> <div class="divider"></div>
<div id="cv-result-yes"> <div id="cv-result-yes">
<p>The given site, (project=<b><tt>${project}</tt></b>, language=<b><tt>${lang}</tt></b>) doesn't seem to exist. <a href="//${lang}.${project}.org/">Check its URL?</a></p>
<p>The given site, (project=<b><tt>${project}</tt></b>, language=<b><tt>${lang}</tt></b>) doesn't seem to exist. It may also be closed or private. <a href="//${lang}.${project}.org/">Confirm its URL.</a></p>
</div> </div>
% elif project and lang and title and page and not result: % elif project and lang and title and page and not result:
<div class="divider"></div> <div class="divider"></div>


Loading…
Cancel
Save