From: "Paul Varner" <fuzzyray@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
Date: Wed, 13 Jul 2011 20:06:43 +0000 (UTC) [thread overview]
Message-ID: <0f177509d8384c822240f62d4416afa1ea56d540.fuzzyray@gentoo> (raw)
commit: 0f177509d8384c822240f62d4416afa1ea56d540
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 13 20:06:13 2011 +0000
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Wed Jul 13 20:06:13 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=0f177509
Fix python 3 incompatible code
---
pym/gentoolkit/revdep_rebuild/analyse.py | 8 ++++----
pym/gentoolkit/revdep_rebuild/cache.py | 8 ++++----
pym/gentoolkit/revdep_rebuild/collect.py | 2 +-
pym/gentoolkit/revdep_rebuild/rebuild.py | 12 ++++++------
pym/gentoolkit/revdep_rebuild/stuff.py | 4 ++--
5 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/pym/gentoolkit/revdep_rebuild/analyse.py b/pym/gentoolkit/revdep_rebuild/analyse.py
index f0ef323..700c966 100644
--- a/pym/gentoolkit/revdep_rebuild/analyse.py
+++ b/pym/gentoolkit/revdep_rebuild/analyse.py
@@ -9,10 +9,10 @@ import glob
from portage.output import bold, red, blue, yellow, green, nocolor
-from stuff import scan
-from collect import prepare_search_dirs, parse_revdep_config, collect_libraries_from_dir, collect_binaries_from_dir
-from assign import assign_packages
-from cache import save_cache
+from .stuff import scan
+from .collect import prepare_search_dirs, parse_revdep_config, collect_libraries_from_dir, collect_binaries_from_dir
+from .assign import assign_packages
+from .cache import save_cache
def prepare_checks(files_to_check, libraries, bits, cmd_max_args):
diff --git a/pym/gentoolkit/revdep_rebuild/cache.py b/pym/gentoolkit/revdep_rebuild/cache.py
index a1cb1ec..ca2ab1b 100644
--- a/pym/gentoolkit/revdep_rebuild/cache.py
+++ b/pym/gentoolkit/revdep_rebuild/cache.py
@@ -5,7 +5,7 @@ import os
import time
from portage.output import red
-from settings import DEFAULTS
+from .settings import DEFAULTS
def read_cache(temp_path=DEFAULTS['DEFAULT_TMP_DIR']):
@@ -18,7 +18,7 @@ def read_cache(temp_path=DEFAULTS['DEFAULT_TMP_DIR']):
ret = {'libraries':[], 'la_libraries':[], 'libraries_links':[], 'binaries':[]}
try:
- for key,val in ret.iteritems():
+ for key,val in list(ret.items()):
f = open(os.path.join(temp_path, key))
for line in f.readlines():
val.append(line.strip())
@@ -44,7 +44,7 @@ def save_cache(logger, to_save={}, temp_path=DEFAULTS['DEFAULT_TMP_DIR']):
f.write(str(int(time.time())))
f.close()
- for key,val in to_save.iteritems():
+ for key,val in list(to_save.items()):
f = open(os.path.join(temp_path, key), 'w')
for line in val:
f.write(line + '\n')
@@ -87,7 +87,7 @@ def check_temp_files(temp_path=DEFAULTS['DEFAULT_TMP_DIR'], max_delay=3600):
if __name__ == '__main__':
print('Preparing cache ... ')
- from collect import *
+ from .collect import *
import logging
bin_dirs, lib_dirs = prepare_search_dirs()
diff --git a/pym/gentoolkit/revdep_rebuild/collect.py b/pym/gentoolkit/revdep_rebuild/collect.py
index b9e9c0d..3f05161 100644
--- a/pym/gentoolkit/revdep_rebuild/collect.py
+++ b/pym/gentoolkit/revdep_rebuild/collect.py
@@ -18,7 +18,7 @@ def parse_conf(conf_file, visited=None, logger=None):
lib_dirs = set()
to_parse = set()
- if isinstance(conf_file, basestring):
+ if isinstance(conf_file, str):
conf_file = [conf_file]
for conf in conf_file:
diff --git a/pym/gentoolkit/revdep_rebuild/rebuild.py b/pym/gentoolkit/revdep_rebuild/rebuild.py
index d26e186..aa802bb 100644
--- a/pym/gentoolkit/revdep_rebuild/rebuild.py
+++ b/pym/gentoolkit/revdep_rebuild/rebuild.py
@@ -25,12 +25,12 @@ import logging
from portage import portdb
from portage.output import bold, red, blue, yellow, green, nocolor
-from analyse import analyse
-from stuff import exithandler, get_masking_status
-from cache import check_temp_files, read_cache
-from assign import get_slotted_cps
-from settings import DEFAULTS
-from gentoolkit.revdep_rebuild import __version__
+from .analyse import analyse
+from .stuff import exithandler, get_masking_status
+from .cache import check_temp_files, read_cache
+from .assign import get_slotted_cps
+from .settings import DEFAULTS
+from . import __version__
APP_NAME = sys.argv[0]
diff --git a/pym/gentoolkit/revdep_rebuild/stuff.py b/pym/gentoolkit/revdep_rebuild/stuff.py
index 66f5769..64b9601 100644
--- a/pym/gentoolkit/revdep_rebuild/stuff.py
+++ b/pym/gentoolkit/revdep_rebuild/stuff.py
@@ -8,11 +8,11 @@ import portage
# util. functions
def call_program(args):
- ''' Calls program with specified parameters and returns stdout '''
+ ''' Calls program with specified parameters and returns stdout as a str object '''
subp = subprocess.Popen(args, stdout=subprocess.PIPE, \
stderr=subprocess.PIPE)
stdout, stderr = subp.communicate()
- return stdout
+ return str(stdout)
def scan(params, files, max_args):
next reply other threads:[~2011-07-13 20:06 UTC|newest]
Thread overview: 115+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-13 20:06 Paul Varner [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-05-27 17:27 [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/ Mike Gilbert
2014-11-12 21:29 Paul Varner
2014-11-12 7:16 Slawek Lis
2014-11-07 20:41 Slawek Lis
2014-11-07 20:41 Slawek Lis
2014-11-07 20:41 Slawek Lis
2014-11-07 20:41 Slawek Lis
2014-11-07 20:41 Slawek Lis
2014-11-07 20:41 Slawek Lis
2014-10-30 18:56 Paul Varner
2014-08-28 7:37 Slawek Lis
2014-03-27 6:59 Slawek Lis
2014-03-26 8:21 Slawek Lis
2014-03-24 7:17 Slawek Lis
2014-03-24 7:17 Slawek Lis
2014-03-17 6:50 Slawek Lis
2014-03-17 6:50 Slawek Lis
2014-03-11 21:43 Paul Varner
2014-03-11 21:22 Paul Varner
2014-02-19 5:01 Brian Dolbec
2014-02-19 4:33 Brian Dolbec
2014-02-19 4:33 Brian Dolbec
2014-02-19 3:14 Brian Dolbec
2014-02-19 3:14 Brian Dolbec
2014-02-19 3:14 Brian Dolbec
2014-02-19 3:14 Brian Dolbec
2014-02-19 3:14 Brian Dolbec
2014-02-19 3:14 Brian Dolbec
2014-02-19 3:14 Brian Dolbec
2014-02-19 3:14 Brian Dolbec
2014-02-18 18:51 Brian Dolbec
2014-02-18 18:51 Brian Dolbec
2014-02-18 17:59 Brian Dolbec
2014-02-18 17:23 Brian Dolbec
2014-02-18 7:30 Brian Dolbec
2014-02-18 6:15 Brian Dolbec
2014-02-17 10:31 Slawek Lis
2014-02-17 8:50 Slawek Lis
2014-02-16 20:55 Brian Dolbec
2014-02-13 22:08 Paul Varner
2014-02-12 21:12 Paul Varner
2014-02-12 16:20 Brian Dolbec
2014-02-12 16:20 Brian Dolbec
2014-02-12 10:42 Brian Dolbec
2014-02-12 10:22 Brian Dolbec
2014-02-12 10:22 Brian Dolbec
2014-02-12 10:22 Brian Dolbec
2014-02-12 10:22 Brian Dolbec
2014-02-11 19:39 Brian Dolbec
2014-02-11 18:49 Brian Dolbec
2014-02-11 18:49 Brian Dolbec
2014-02-11 18:49 Brian Dolbec
2014-02-11 18:49 Brian Dolbec
2014-02-11 18:49 Brian Dolbec
2014-02-11 18:49 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2014-02-11 8:40 Brian Dolbec
2012-11-09 14:16 Paul Varner
2012-03-19 6:50 Brian Dolbec
2012-03-04 7:41 Brian Dolbec
2012-03-02 17:47 Brian Dolbec
2011-10-10 17:36 Brian Dolbec
2011-10-10 16:09 Brian Dolbec
2011-07-14 18:29 Paul Varner
2011-07-14 18:29 Paul Varner
2011-07-14 2:32 Paul Varner
2011-07-14 1:44 Brian Dolbec
2011-07-14 1:44 Brian Dolbec
2011-07-13 16:01 Paul Varner
2011-07-13 15:35 Brian Dolbec
2011-07-13 5:53 Brian Dolbec
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
2011-07-12 21:45 Paul Varner
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=0f177509d8384c822240f62d4416afa1ea56d540.fuzzyray@gentoo \
--to=fuzzyray@gentoo.org \
--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