diff options
author | Jauhien Piatlicki (jauhien) <piatlicki@gmail.com> | 2013-07-17 17:40:31 +0200 |
---|---|---|
committer | Jauhien Piatlicki (jauhien) <piatlicki@gmail.com> | 2013-07-17 17:40:31 +0200 |
commit | 4e975f51852ba18933274cf1cb9cbc0057026d7c (patch) | |
tree | 837438f66327c4936f12d90e5690e8de9bde7dd9 | |
parent | load remote file functionality added (diff) | |
download | gs-elpa-4e975f51852ba18933274cf1cb9cbc0057026d7c.tar.gz gs-elpa-4e975f51852ba18933274cf1cb9cbc0057026d7c.tar.bz2 gs-elpa-4e975f51852ba18933274cf1cb9cbc0057026d7c.zip |
g_elpa/elpa_db: ElpaDB, removed redudant function
-rw-r--r-- | g_elpa/elpa_db.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/g_elpa/elpa_db.py b/g_elpa/elpa_db.py index c2b7865..c55a947 100644 --- a/g_elpa/elpa_db.py +++ b/g_elpa/elpa_db.py @@ -31,18 +31,12 @@ class ElpaDB(PackageDB): def __init__(self, directory, repo_uri="", db_uri=""): super(ElpaDB, self).__init__(directory, repo_uri, db_uri) - def _load_archive_contents(self, archive_contents_f): - try: - archive_contents = sexpdata.load(archive_contents_f) - except Exception as e: - raise SyncError('sync failed: ' + self.repo_uri + ': ' + str(e)) - return archive_contents - + def generate_tree(self): ac_uri = urljoin(self.repo_uri, 'archive-contents') - archive_contents = load_remote_file(ac_uri, self._load_archive_contents)['archive-contents'] - + archive_contents = load_remote_file(ac_uri, sexpdata.load)['archive-contents'] + if sexpdata.car(archive_contents) != 1: raise SyncError('sync failed: ' + self.repo_uri + ' bad archive contents format') |