euscanwww: Minor cleanings

Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
volpino 2012-08-14 13:51:07 +02:00
parent f2a4d5d4a4
commit ec2e132583
4 changed files with 8 additions and 3 deletions

View File

@ -127,6 +127,7 @@ def get_account_versionlogs(profile):
Q(package__in=packages) | Q(overlay__in=overlays)
)
def get_user_fav_infos(user):
upstream_k = lambda c: c["n_versions"] - c["n_packaged"] - c["n_overlay"]

View File

@ -221,6 +221,8 @@ def update_upstream():
@task
def scan_package(package):
logger = scan_package.get_logger()
logger.info("Scanning package %s", package)
scan_portage([package], purge_packages=True, purge_versions=True)
scan_metadata([package])
scan_upstream([package])
@ -272,7 +274,8 @@ def consume_refresh_queue(locked=False):
def send_user_email(address, subject, text):
try:
send_mail(
subject, text, settings.DEFAULT_FROM_EMAIL, [address], fail_silently=False
subject, text, settings.DEFAULT_FROM_EMAIL, [address],
fail_silently=False
)
except Exception, exc:
raise send_user_email.retry(exc=exc)

View File

@ -406,6 +406,7 @@ def accounts_index(request):
return infos
@login_required
@render_to('euscan/accounts/preferences.html')
def accounts_preferences(request):

View File

@ -58,7 +58,7 @@ def parse_src_uri(uris):
uri = from_mirror(uri)
if uris and uris[-1] == "->":
operator = uris.pop()
uris.pop() # operator
file_ = uris.pop()
else:
file_ = os.path.basename(uri)