diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-16 01:19:04 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-16 01:19:04 -0400 |
commit | 7da44456fd05f2ac74355825de7100e46e86449b (patch) | |
tree | 036c0732cbfcbbbd0cf9f7b3dd06d3c2ea7e9b09 | |
parent | 155bf43a28e404f327a7bcff214c22e212627673 (diff) | |
parent | 1edc33fd73ba588dea8765cd2d9a936f98d7dc1e (diff) |
Merge tag 'release_2015-01-13' into archweb-generic
Version bumps and minor fixes
-rw-r--r-- | devel/reports.py | 6 | ||||
-rw-r--r-- | mirrors/management/commands/mirrorcheck.py | 9 | ||||
-rw-r--r-- | public/views.py | 2 | ||||
-rw-r--r-- | requirements.txt | 9 | ||||
-rw-r--r-- | requirements_prod.txt | 11 |
5 files changed, 20 insertions, 17 deletions
diff --git a/devel/reports.py b/devel/reports.py index ca1a3321..66fbd627 100644 --- a/devel/reports.py +++ b/devel/reports.py @@ -48,7 +48,8 @@ def big(packages, username): def badcompression(packages, username): cutoff = 0.90 * F('installed_size') - packages = packages.filter(compressed_size__gt=0, installed_size__gt=0, + packages = packages.filter(compressed_size__gt=25*1024, + installed_size__gt=25*1024, compressed_size__gte=cutoff).order_by('-compressed_size') # Format the compressed and installed sizes with MB/GB/etc suffixes @@ -153,11 +154,10 @@ REPORT_BIG = DeveloperReport('big', 'Big', ['compressed_size_pretty', 'installed_size_pretty']) REPORT_BADCOMPRESS = DeveloperReport('badcompression', 'Bad Compression', - 'Packages with a compression ratio of less than 10%', badcompression, + 'Packages > 25 KiB with a compression ratio < 10%', badcompression, ['Compressed Size', 'Installed Size', 'Ratio', 'Type'], ['compressed_size_pretty', 'installed_size_pretty','ratio', 'compress_type']) - REPORT_MAN = DeveloperReport('uncompressed-man', 'Uncompressed Manpages', 'Packages with uncompressed manpages', uncompressed_man) diff --git a/mirrors/management/commands/mirrorcheck.py b/mirrors/management/commands/mirrorcheck.py index d2a27bee..8c17c78f 100644 --- a/mirrors/management/commands/mirrorcheck.py +++ b/mirrors/management/commands/mirrorcheck.py @@ -96,7 +96,7 @@ def parse_lastsync(log, data): try: parsed_time = datetime.utcfromtimestamp(int(data)) log.last_sync = parsed_time.replace(tzinfo=utc) - except ValueError: + except (TypeError, ValueError): # it is bad news to try logging the lastsync value; # sometimes we get a crazy-encoded web page. # if we couldn't parse a time, this is a failure. @@ -197,8 +197,11 @@ def check_rsync_url(mirror_url, location, timeout): log.duration = None else: logger.debug("success: %s, %.2f", url, log.duration) - with open(lastsync_path, 'r') as lastsync: - parse_lastsync(log, lastsync.read()) + if os.path.exists(lastsync_path): + with open(lastsync_path, 'r') as lastsync: + parse_lastsync(log, lastsync.read()) + else: + parse_lastsync(log, None) finally: if os.path.exists(lastsync_path): os.unlink(lastsync_path) diff --git a/public/views.py b/public/views.py index c0dae400..7dd0528c 100644 --- a/public/views.py +++ b/public/views.py @@ -142,8 +142,6 @@ def keys_json(request): users = User.objects.filter( is_active=True, userprofile__id__in=profile_ids).select_related( 'userprofile__pgp_key').order_by('first_name', 'last_name') - - users = User.objects.filter(is_active=True).select_related('userprofile') node_list = [{ 'name': user.get_full_name(), 'key': user.userprofile.pgp_key, diff --git a/requirements.txt b/requirements.txt index 2a5dba96..54cf90f0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,12 @@ -e git+git://github.com/fredj/cssmin.git@master#egg=cssmin -Django==1.7.1 +Django==1.7.3 IPy==0.81 Jinja2==2.7.3 Markdown==2.5.2 +MarkupSafe==0.23 bencode==1.0 django-jinja==1.0.5 -django_countries==3.0.1 -jsmin==2.0.11 +django_countries==3.0.2 +jsmin==2.1.0 pgpdump==1.5 -pytz>=2014.7 +pytz>=2014.10 diff --git a/requirements_prod.txt b/requirements_prod.txt index 6edfa17f..ac528ef9 100644 --- a/requirements_prod.txt +++ b/requirements_prod.txt @@ -1,14 +1,15 @@ -e git+git://github.com/fredj/cssmin.git@master#egg=cssmin -Django==1.7.1 +Django==1.7.3 IPy==0.81 Jinja2==2.7.3 Markdown==2.5.2 +MarkupSafe==0.23 bencode==1.0 django-jinja==1.0.5 -django_countries==3.0.1 -jsmin==2.0.11 +django_countries==3.0.2 +jsmin==2.1.0 pgpdump==1.5 psycopg2==2.5.4 -pyinotify==0.9.4 +pyinotify==0.9.5 python-memcached==1.53 -pytz>=2014.7 +pytz>=2014.10 |