From: "Jauhien Piatlicki" <piatlicki@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/g-sorcery:master commit in: g_sorcery/
Date: Tue, 2 Jul 2013 08:39:26 +0000 (UTC) [thread overview]
Message-ID: <1372753473.287c6639052afbaffd35e7722ec2e2de9a1e7710.jauhien@gentoo> (raw)
commit: 287c6639052afbaffd35e7722ec2e2de9a1e7710
Author: Jauhien Piatlicki (jauhien) <piatlicki <AT> gmail <DOT> com>
AuthorDate: Tue Jul 2 08:24:33 2013 +0000
Commit: Jauhien Piatlicki <piatlicki <AT> gmail <DOT> com>
CommitDate: Tue Jul 2 08:24:33 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/g-sorcery.git;a=commit;h=287c6639
g_sorcery/fileutils: wget
---
g_sorcery/fileutils.py | 3 +++
g_sorcery/package_db.py | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/g_sorcery/fileutils.py b/g_sorcery/fileutils.py
index 1920495..a8415c0 100644
--- a/g_sorcery/fileutils.py
+++ b/g_sorcery/fileutils.py
@@ -70,3 +70,6 @@ def copy_all(src, dst):
shutil.copytree(src_name, dst_name)
else:
shutil.copy2(src_name, dst_name)
+
+def wget(uri, directory):
+ return os.system('wget -P ' + directory + ' ' + uri)
diff --git a/g_sorcery/package_db.py b/g_sorcery/package_db.py
index fc59878..179d07d 100644
--- a/g_sorcery/package_db.py
+++ b/g_sorcery/package_db.py
@@ -14,7 +14,7 @@
from .exceptions import DBStructureError, IntegrityError, \
InvalidKeyError, SyncError
-from .fileutils import FileJSON, hash_file, copy_all
+from .fileutils import FileJSON, hash_file, copy_all, wget
import portage
@@ -81,7 +81,7 @@ class PackageDB:
self.clean()
real_db_uri = self.get_real_db_uri()
download_dir = tempfile.TemporaryDirectory()
- if os.system('wget -P ' + download_dir.name + ' ' + real_db_uri):
+ if wget(real_db_uri, download_dir.name):
raise SyncError('sync failed: ' + real_db_uri)
temp_dir = tempfile.TemporaryDirectory()
next reply other threads:[~2013-07-02 8:39 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-02 8:39 Jauhien Piatlicki [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-02-24 18:02 [gentoo-commits] proj/g-sorcery:master commit in: g_sorcery/ Ulrich Müller
2015-08-18 18:59 Jauhien Piatlicki
2015-08-18 10:41 [gentoo-commits] proj/g-sorcery:dev " Jauhien Piatlicki
2015-08-18 10:42 ` [gentoo-commits] proj/g-sorcery:master " Jauhien Piatlicki
2015-04-22 7:35 Jauhien Piatlicki
2015-04-20 21:36 [gentoo-commits] proj/g-sorcery:dev " Jauhien Piatlicki
2015-04-22 7:35 ` [gentoo-commits] proj/g-sorcery:master " Jauhien Piatlicki
2014-11-24 14:25 [gentoo-commits] proj/g-sorcery:dev " Jauhien Piatlicki
2014-11-24 14:25 ` [gentoo-commits] proj/g-sorcery:master " Jauhien Piatlicki
2013-09-20 15:09 Jauhien Piatlicki
2013-09-19 23:21 Jauhien Piatlicki
2013-09-18 22:09 Jauhien Piatlicki
2013-09-16 15:05 Jauhien Piatlicki
2013-09-16 14:33 Jauhien Piatlicki
2013-09-16 14:33 Jauhien Piatlicki
2013-09-15 22:38 Jauhien Piatlicki
2013-09-15 18:08 Jauhien Piatlicki
2013-09-15 17:46 Jauhien Piatlicki
2013-09-15 17:46 Jauhien Piatlicki
2013-09-05 21:29 Jauhien Piatlicki
2013-09-04 23:52 Jauhien Piatlicki
2013-09-04 18:14 Jauhien Piatlicki
2013-09-04 18:03 Jauhien Piatlicki
2013-09-04 18:03 Jauhien Piatlicki
2013-09-04 13:37 Jauhien Piatlicki
2013-09-01 22:12 Jauhien Piatlicki
2013-08-12 0:36 Jauhien Piatlicki
2013-08-02 10:18 Jauhien Piatlicki
2013-08-01 15:58 Jauhien Piatlicki
2013-08-01 15:58 Jauhien Piatlicki
2013-08-01 15:58 Jauhien Piatlicki
2013-08-01 15:58 Jauhien Piatlicki
2013-08-01 15:58 Jauhien Piatlicki
2013-08-01 15:58 Jauhien Piatlicki
2013-08-01 12:55 Jauhien Piatlicki
2013-08-01 12:39 Jauhien Piatlicki
2013-08-01 12:39 Jauhien Piatlicki
2013-08-01 12:39 Jauhien Piatlicki
2013-08-01 12:39 Jauhien Piatlicki
2013-08-01 12:39 Jauhien Piatlicki
2013-08-01 12:39 Jauhien Piatlicki
2013-08-01 12:39 Jauhien Piatlicki
2013-08-01 12:39 Jauhien Piatlicki
2013-07-31 23:29 Jauhien Piatlicki
2013-07-23 23:13 Jauhien Piatlicki
2013-07-23 23:13 Jauhien Piatlicki
2013-07-19 14:44 Jauhien Piatlicki
2013-07-19 11:10 Jauhien Piatlicki
2013-07-18 17:26 Jauhien Piatlicki
2013-07-18 12:18 Jauhien Piatlicki
2013-07-18 12:18 Jauhien Piatlicki
2013-07-18 10:53 Jauhien Piatlicki
2013-07-17 17:05 Jauhien Piatlicki
2013-07-17 8:06 Jauhien Piatlicki
2013-07-16 23:09 Jauhien Piatlicki
2013-07-16 23:09 Jauhien Piatlicki
2013-07-15 17:20 Jauhien Piatlicki
2013-07-15 16:33 Jauhien Piatlicki
2013-07-15 0:18 Jauhien Piatlicki
2013-07-14 23:47 Jauhien Piatlicki
2013-07-13 23:35 Jauhien Piatlicki
2013-07-13 22:22 Jauhien Piatlicki
2013-07-13 15:12 Jauhien Piatlicki
2013-07-13 15:12 Jauhien Piatlicki
2013-07-04 20:24 Jauhien Piatlicki
2013-07-03 23:49 Jauhien Piatlicki
2013-07-03 23:49 Jauhien Piatlicki
2013-07-03 23:32 Jauhien Piatlicki
2013-07-03 22:54 Jauhien Piatlicki
2013-07-03 22:54 Jauhien Piatlicki
2013-07-03 22:54 Jauhien Piatlicki
2013-07-03 22:54 Jauhien Piatlicki
2013-07-03 22:54 Jauhien Piatlicki
2013-07-02 17:30 Jauhien Piatlicki
2013-07-02 12:39 Jauhien Piatlicki
2013-07-01 0:07 Jauhien Piatlicki
2013-06-30 23:29 Jauhien Piatlicki
2013-06-29 14:16 Jauhien Piatlicki
2013-06-29 12:13 Jauhien Piatlicki
2013-06-29 12:13 Jauhien Piatlicki
2013-06-24 21:09 Jauhien Piatlicki
2013-06-24 21:09 Jauhien Piatlicki
2013-06-23 0:44 Jauhien Piatlicki
2013-06-23 0:44 Jauhien Piatlicki
2013-06-23 0:44 Jauhien Piatlicki
2013-06-20 23:44 Jauhien Piatlicki
2013-06-20 23:21 Jauhien Piatlicki
2013-06-20 22:53 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=1372753473.287c6639052afbaffd35e7722ec2e2de9a1e7710.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