euscanwww: Minor cleanings
Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
parent
f2a4d5d4a4
commit
ec2e132583
@ -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"]
|
||||
|
||||
|
@ -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)
|
||||
|
@ -402,10 +402,11 @@ def accounts_index(request):
|
||||
user = request.user
|
||||
|
||||
infos = get_user_fav_infos(user)
|
||||
infos['vlog'] = UserFeed().items({'user':user, 'options' : {}})
|
||||
infos['vlog'] = UserFeed().items({'user': user, 'options': {}})
|
||||
|
||||
return infos
|
||||
|
||||
|
||||
@login_required
|
||||
@render_to('euscan/accounts/preferences.html')
|
||||
def accounts_preferences(request):
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user