From be1478431d459598fd1f28c028c03341109d2887 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Sun, 10 Jan 2010 00:55:03 -0500 Subject: [PATCH] Fix detectVersion bug, make unsupported nicer. Signed-off-by: Edward Z. Yang --- wizard/command/summary/unsupported.py | 13 ++++++++++--- wizard/deploy.py | 1 - 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/wizard/command/summary/unsupported.py b/wizard/command/summary/unsupported.py index 6c2ee7b..1ca658d 100644 --- a/wizard/command/summary/unsupported.py +++ b/wizard/command/summary/unsupported.py @@ -11,10 +11,15 @@ def main(argv, baton): tags = set(shell.eval("git", "--git-dir=" + application.repository(options.srv_path), "tag").strip().split()) unsupported = set() for d in deploy.parse_install_lines(appname, options.versions_path): - version = d.detectVersion() + try: + version = d.detectVersion() + except IOError: + continue if "wordpress-%s" % version not in tags: - unsupported.add(version) - for v in unsupported: + print version + unsupported.add(str(version)) + print "SUMMARY:" + for v in sorted(distutils.version.LooseVersion(x) for x in list(unsupported)): print v def parse_args(argv, baton): @@ -30,5 +35,7 @@ since Git may lie if the user manually upgraded their install.""" options, args = parser.parse_all(argv) if len(args) > 1: parser.error("too many arguments") + if len(args) < 1: + parser.error("must specify application") return options, args diff --git a/wizard/deploy.py b/wizard/deploy.py index a748f1b..613e095 100644 --- a/wizard/deploy.py +++ b/wizard/deploy.py @@ -199,7 +199,6 @@ class Deployment(object): if not str(real) == self.app_version.pristine_tag.partition('-')[2]: raise VersionMismatchError(real, self.version) - @property @chdir_to_location def detectVersion(self): """ -- 2.45.2