aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-07-17 17:40:31 +0200
committerJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-07-17 17:40:31 +0200
commit4e975f51852ba18933274cf1cb9cbc0057026d7c (patch)
tree837438f66327c4936f12d90e5690e8de9bde7dd9
parentload remote file functionality added (diff)
downloadgs-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.py12
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')