diff options
author | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2015-03-19 09:34:58 +0000 |
---|---|---|
committer | Morph (on behalf of Adam Coldrick) <adam.coldrick@codethink.co.uk> | 2015-03-19 09:34:58 +0000 |
commit | 7db4ee53fb5398dd8f4ae8f56778735fe6531178 (patch) | |
tree | 01513d77326acd03b2da356ec2cd7f4761901b6b /morphlib/plugins/artifact_inspection_plugin.py | |
parent | 211d6317d22bace089da58875d280ae5e54d5d54 (diff) | |
download | morph-7db4ee53fb5398dd8f4ae8f56778735fe6531178.tar.gz |
Morph build 2ee8190abe87461992f5b7ed85fe2ee9
System branch: master
Diffstat (limited to 'morphlib/plugins/artifact_inspection_plugin.py')
-rw-r--r-- | morphlib/plugins/artifact_inspection_plugin.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/morphlib/plugins/artifact_inspection_plugin.py b/morphlib/plugins/artifact_inspection_plugin.py index 74645f41..b16f393c 100644 --- a/morphlib/plugins/artifact_inspection_plugin.py +++ b/morphlib/plugins/artifact_inspection_plugin.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2014 Codethink Limited +# Copyright (C) 2012-2015 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -10,8 +10,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# with this program. If not, see <http://www.gnu.org/licenses/>. import cliapp @@ -51,7 +50,7 @@ class ProjectVersionGuesser(object): if self.lrc.has_repo(repo): repository = self.lrc.get_repo(repo) for filename in filenames: - yield filename, repository.cat(ref, filename) + yield filename, repository.read_file(filename, ref) elif self.rrc: for filename in filenames: yield filename, self.rrc.cat_file(repo, ref, filename) @@ -153,7 +152,7 @@ class VersionGuesser(object): repository = self.lrc.get_repo(repo) if not self.app.settings['no-git-update']: repository.update() - tree = repository.ls_tree(ref) + tree = repository.list_files(ref=ref, recurse=False) elif self.rrc: repository = None tree = self.rrc.ls_tree(repo, ref) @@ -163,7 +162,7 @@ class VersionGuesser(object): version = guesser.guess_version(repo, ref, tree) if version: break - except cliapp.AppException, err: + except cliapp.AppException as err: self.app.status(msg='%(repo)s: Failed to list files in %(ref)s', repo=repo, ref=ref, chatty=True) return version |