public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jauhien Piatlicki" <piatlicki@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/g-sorcery:master commit in: g_elpa/, tests/
Date: Tue,  2 Jul 2013 14:48:58 +0000 (UTC)	[thread overview]
Message-ID: <1372776611.1c6004894b1ecd4397791f09f5b9c0d4d7138809.jauhien@gentoo> (raw)

commit:     1c6004894b1ecd4397791f09f5b9c0d4d7138809
Author:     Jauhien Piatlicki (jauhien) <piatlicki <AT> gmail <DOT> com>
AuthorDate: Tue Jul  2 14:50:11 2013 +0000
Commit:     Jauhien Piatlicki <piatlicki <AT> gmail <DOT> com>
CommitDate: Tue Jul  2 14:50:11 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/g-sorcery.git;a=commit;h=1c600489

py2k: urljoin

---
 g_elpa/elpa_db.py     | 11 ++++++++---
 tests/test_elpa_db.py |  2 +-
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/g_elpa/elpa_db.py b/g_elpa/elpa_db.py
index 87e7095..51294ea 100644
--- a/g_elpa/elpa_db.py
+++ b/g_elpa/elpa_db.py
@@ -11,11 +11,16 @@
     :license: GPL-2, see LICENSE for more details.
 """
 
-import os, tempfile, urllib.parse
+import os
 
 import sexpdata
 
-from g_sorcery.compatibility import TemporaryDirectory
+from g_sorcery.compatibility import py2k, TemporaryDirectory
+
+if py2k:
+    from urlparse import urljoin
+else:
+    from urllib.parse import urljoin
 
 from g_sorcery.package_db import Package, PackageDB
 from g_sorcery.fileutils import wget
@@ -28,7 +33,7 @@ class ElpaDB(PackageDB):
     def generate_tree(self):
         tempdir = TemporaryDirectory()
         
-        ac_uri = urllib.parse.urljoin(self.repo_uri, 'archive-contents')
+        ac_uri = urljoin(self.repo_uri, 'archive-contents')
         if wget(ac_uri, tempdir.name):
             raise SyncError('sync failed: ' + self.repo_uri)
 

diff --git a/tests/test_elpa_db.py b/tests/test_elpa_db.py
index 874ee96..1ba99c7 100644
--- a/tests/test_elpa_db.py
+++ b/tests/test_elpa_db.py
@@ -11,7 +11,7 @@
     :license: GPL-2, see LICENSE for more details.
 """
 
-import http.server, os, tempfile, threading, unittest
+import os, unittest
 
 from g_elpa import elpa_db
 


             reply	other threads:[~2013-07-02 14:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-02 14:48 Jauhien Piatlicki [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-07-02 11:29 [gentoo-commits] proj/g-sorcery:master commit in: g_elpa/, tests/ Jauhien Piatlicki
2013-07-02  8:39 Jauhien Piatlicki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1372776611.1c6004894b1ecd4397791f09f5b9c0d4d7138809.jauhien@gentoo \
    --to=piatlicki@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox