summaryrefslogtreecommitdiff
path: root/releng/management/commands/syncisos.py
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-12-12 18:01:59 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-12-12 18:01:59 -0500
commit764182c0ca66b538cef994409f04f876681598cd (patch)
tree2f399c618484c00f84875b437f3fcfcc9c509424 /releng/management/commands/syncisos.py
parent8844fd0c6361d3a6ccd88647276e9af0e6cd64d2 (diff)
parent822898e57bc6d4e008ef58da309857e9ef8c98e6 (diff)
Merge commit '822898e' (Merge branch 'django14')
Conflicts: requirements.txt requirements_prod.txt templates/base.html templates/devel/clock.html templates/public/download.html templates/public/index.html templates/releng/results.html
Diffstat (limited to 'releng/management/commands/syncisos.py')
-rw-r--r--releng/management/commands/syncisos.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/releng/management/commands/syncisos.py b/releng/management/commands/syncisos.py
index 270c6c34..62f005ff 100644
--- a/releng/management/commands/syncisos.py
+++ b/releng/management/commands/syncisos.py
@@ -1,4 +1,3 @@
-from datetime import datetime
import re
import urllib
from HTMLParser import HTMLParser, HTMLParseError
@@ -6,8 +5,10 @@ from HTMLParser import HTMLParser, HTMLParseError
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
+from main.utils import utc_now
from releng.models import Iso
+
class IsoListParser(HTMLParser):
def __init__(self):
HTMLParser.__init__(self)
@@ -53,7 +54,7 @@ class Command(BaseCommand):
existing.active = True
existing.removed = None
existing.save()
- now = datetime.utcnow()
+ now = utc_now()
# and then mark all other names as no longer active
Iso.objects.filter(active=True).exclude(name__in=active_isos).update(
active=False, removed=now)