[gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/modules/vcs/git/
commit: 4375ccd4188467dbd15308baf23331668afe4691 Author: Zac Medico gentoo org> AuthorDate: Wed Feb 8 17:12:26 2017 + Commit: Zac Medico gentoo org> CommitDate: Wed Feb 8 17:52:17 2017 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=4375ccd4 Status.check: fix ResourceWarning subprocess "still running" (bug 608594) Use repoman_popen context manager, in order to fix Python 3.6 ResourceWarnings which report that the subprocess is still running. X-Gentoo-Bug: 608594 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=608594 repoman/pym/repoman/modules/vcs/git/status.py | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/repoman/pym/repoman/modules/vcs/git/status.py b/repoman/pym/repoman/modules/vcs/git/status.py index 04f50ceb9..e5aa9c741 100644 --- a/repoman/pym/repoman/modules/vcs/git/status.py +++ b/repoman/pym/repoman/modules/vcs/git/status.py @@ -29,15 +29,14 @@ class Status(object): @param xpkg: string of the package being checked @returns: boolean ''' - myf = repoman_popen( + with repoman_popen( "git ls-files --others %s" % - (portage._shell_quote(checkdir_relative),)) - for l in myf: - if l[:-1][-7:] == ".ebuild": - self.qatracker.add_error( - "ebuild.notadded", - os.path.join(xpkg, os.path.basename(l[:-1]))) - myf.close() + (portage._shell_quote(checkdir_relative),)) as myf: + for l in myf: + if l[:-1][-7:] == ".ebuild": + self.qatracker.add_error( + "ebuild.notadded", + os.path.join(xpkg, os.path.basename(l[:-1]))) return True @staticmethod
[gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/modules/vcs/git/
commit: a514908c7fd29e668dd775d7a32c949dbc8fe7d7 Author: Brian Dolbec gentoo org> AuthorDate: Fri Sep 16 00:36:06 2016 + Commit: Brian Dolbec gentoo org> CommitDate: Fri Sep 16 19:36:17 2016 + URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=a514908c repoman/.../git/status.py: Fix some missed copy/paste docstring edits repoman/pym/repoman/modules/vcs/git/status.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repoman/pym/repoman/modules/vcs/git/status.py b/repoman/pym/repoman/modules/vcs/git/status.py index 48a73be..04f50ce 100644 --- a/repoman/pym/repoman/modules/vcs/git/status.py +++ b/repoman/pym/repoman/modules/vcs/git/status.py @@ -10,7 +10,7 @@ from repoman._subprocess import repoman_popen, repoman_getstatusoutput class Status(object): - '''Performs status checks on the svn repository''' + '''Performs status checks on the git repository''' def __init__(self, qatracker, eadded): '''Class init @@ -22,7 +22,7 @@ class Status(object): self.eadded = eadded def check(self, checkdir, checkdir_relative, xpkg): - '''Perform the svn status check + '''Perform the git status check @param checkdir: string of the directory being checked @param checkdir_relative: string of the relative directory being checked