diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-05-07 16:33:02 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-05-08 09:29:06 +0000 |
commit | 0564aadd75aaf961190eba278ab89ab079568bd7 (patch) | |
tree | f0366ec026df82dd30684428140bcd56b0bd6464 | |
parent | bbd332414ccada1228d5e080a9094fbb8e270d3c (diff) | |
download | morph-0564aadd75aaf961190eba278ab89ab079568bd7.tar.gz |
Change cache_check_plugin a bit
-rw-r--r-- | morphlib/plugins/validate_plugin.py | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/morphlib/plugins/validate_plugin.py b/morphlib/plugins/validate_plugin.py deleted file mode 100644 index 5234f100..00000000 --- a/morphlib/plugins/validate_plugin.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (C) 2012,2013,2014 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# 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. - - -import cliapp -import contextlib -import uuid - -import morphlib - - -class ValidatePlugin(cliapp.Plugin): - - def enable(self): - self.app.add_subcommand('validate', self.validate) - - def validate(self, args): - '''Validate inputs and caches. - - ''' - - lrc, rrc = morphlib.util.new_repo_caches(self.app) - - git_errors = lrc.validate() - - self.app.output.write('Found corruption in %i cached git repos.\n' % - len(git_errors)) - - for repo_dir, error_text in git_errors.iteritems(): - self.app.output.write(' %s\n' % repo_dir) - if self.app.settings['verbose']: - error_text_indented = '\n'.join( - [' ' + line for line in error_text.split('\n')]) - self.app.output.write(" %s\n" % error_text_indented) |