From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 22D59139085 for ; Sun, 22 Jan 2017 12:24:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 89730142A9; Sun, 22 Jan 2017 12:24:19 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6CCE2142A9 for ; Sun, 22 Jan 2017 12:24:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 95390341692 for ; Sun, 22 Jan 2017 12:24:18 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0BD442C74 for ; Sun, 22 Jan 2017 12:24:17 +0000 (UTC) From: "Gilles Dartiguelongue" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Gilles Dartiguelongue" Message-ID: <1485087836.e8f79bda15a675e5802b0daad41144b082d20247.eva@gentoo> Subject: [gentoo-commits] proj/grumpy:master commit in: backend/lib/ X-VCS-Repository: proj/grumpy X-VCS-Files: backend/lib/sync.py X-VCS-Directories: backend/lib/ X-VCS-Committer: eva X-VCS-Committer-Name: Gilles Dartiguelongue X-VCS-Revision: e8f79bda15a675e5802b0daad41144b082d20247 X-VCS-Branch: master Date: Sun, 22 Jan 2017 12:24:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f652d576-db4b-4685-adab-12b07ddf97c5 X-Archives-Hash: 9eec396c0fd1f1e6ff9703962f3c9ad6 commit: e8f79bda15a675e5802b0daad41144b082d20247 Author: Gilles Dartiguelongue gentoo org> AuthorDate: Sun Jan 22 12:07:52 2017 +0000 Commit: Gilles Dartiguelongue gentoo org> CommitDate: Sun Jan 22 12:23:56 2017 +0000 URL: https://gitweb.gentoo.org/proj/grumpy.git/commit/?id=e8f79bda sync: sort imports according to PEP8 backend/lib/sync.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/lib/sync.py b/backend/lib/sync.py index c837c23..5e8240d 100644 --- a/backend/lib/sync.py +++ b/backend/lib/sync.py @@ -1,7 +1,9 @@ -import xml.etree.ElementTree as ET -import requests import time +import xml.etree.ElementTree as ET from datetime import datetime + +import requests + from .. import app, db from .models import Category, Maintainer, Package, PackageVersion @@ -10,6 +12,7 @@ proj_url = "https://api.gentoo.org/metastructure/projects.xml" pkg_url_base = "https://packages.gentoo.org/" http_session = requests.session() + def get_project_data(): projects = {} data = http_session.get(proj_url)