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)
|
Q(package__in=packages) | Q(overlay__in=overlays)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_user_fav_infos(user):
|
def get_user_fav_infos(user):
|
||||||
upstream_k = lambda c: c["n_versions"] - c["n_packaged"] - c["n_overlay"]
|
upstream_k = lambda c: c["n_versions"] - c["n_packaged"] - c["n_overlay"]
|
||||||
|
|
||||||
|
@ -221,6 +221,8 @@ def update_upstream():
|
|||||||
|
|
||||||
@task
|
@task
|
||||||
def scan_package(package):
|
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_portage([package], purge_packages=True, purge_versions=True)
|
||||||
scan_metadata([package])
|
scan_metadata([package])
|
||||||
scan_upstream([package])
|
scan_upstream([package])
|
||||||
@ -272,7 +274,8 @@ def consume_refresh_queue(locked=False):
|
|||||||
def send_user_email(address, subject, text):
|
def send_user_email(address, subject, text):
|
||||||
try:
|
try:
|
||||||
send_mail(
|
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:
|
except Exception, exc:
|
||||||
raise send_user_email.retry(exc=exc)
|
raise send_user_email.retry(exc=exc)
|
||||||
|
@ -406,6 +406,7 @@ def accounts_index(request):
|
|||||||
|
|
||||||
return infos
|
return infos
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
@render_to('euscan/accounts/preferences.html')
|
@render_to('euscan/accounts/preferences.html')
|
||||||
def accounts_preferences(request):
|
def accounts_preferences(request):
|
||||||
|
@ -58,7 +58,7 @@ def parse_src_uri(uris):
|
|||||||
uri = from_mirror(uri)
|
uri = from_mirror(uri)
|
||||||
|
|
||||||
if uris and uris[-1] == "->":
|
if uris and uris[-1] == "->":
|
||||||
operator = uris.pop()
|
uris.pop() # operator
|
||||||
file_ = uris.pop()
|
file_ = uris.pop()
|
||||||
else:
|
else:
|
||||||
file_ = os.path.basename(uri)
|
file_ = os.path.basename(uri)
|
||||||
|
Loading…
Reference in New Issue
Block a user