summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/reports.py6
-rw-r--r--mirrors/management/commands/mirrorcheck.py9
-rw-r--r--public/views.py2
-rw-r--r--requirements.txt9
-rw-r--r--requirements_prod.txt11
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