public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Thomas Deutschmann" <whissi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/security:master commit in: bin/
Date: Mon, 16 Jan 2017 05:53:32 +0000 (UTC)	[thread overview]
Message-ID: <1484535820.e46475c945146cd2fe260e6efed68e11df744853.whissi@gentoo> (raw)

commit:     e46475c945146cd2fe260e6efed68e11df744853
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 16 03:03:40 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Jan 16 03:03:40 2017 +0000
URL:        https://gitweb.gentoo.org/proj/security.git/commit/?id=e46475c9

cvetool: Catch invalid 'info' command usage

 bin/cvetool | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/bin/cvetool b/bin/cvetool
index b8aa5ca..57884ca 100755
--- a/bin/cvetool
+++ b/bin/cvetool
@@ -22,7 +22,16 @@ class CVETool:
         self.auth = auth
 
         if command == 'info':
-            self.info(self.cleanup_cve(sys.argv[2]))
+            if len(args) != 1:
+                print('Usage: info <CVE>')
+                print('Retrieves information about a CVE from database')
+                sys.exit(1)
+
+            try:
+                self.info(self.cleanup_cve(sys.argv[2]))
+            except ValueError:
+                print('"{}" is not a valid CVE identifier!'.format(sys.argv[2]))
+                sys.exit(1)
         elif command == 'assign':
             if len(args) < 2:
                 print('Usage: assign <bug> <CVE> [<CVE>...]')


             reply	other threads:[~2017-01-16  5:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16  5:53 Thomas Deutschmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-03-04  4:06 [gentoo-commits] proj/security:master commit in: bin/ Thomas Deutschmann
2020-03-04  4:06 Thomas Deutschmann
2017-04-25 17:44 Thomas Deutschmann
2017-01-16  5:53 Thomas Deutschmann
2017-01-13 10:45 Thomas Deutschmann
2017-01-13 10:45 Thomas Deutschmann
2016-06-01 17:57 Alex Legler
2014-08-04 23:45 Pavlos Ratis
2014-08-04 23:45 Pavlos Ratis
2014-08-04 23:45 Pavlos Ratis
2014-08-04 23:45 Pavlos Ratis

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=1484535820.e46475c945146cd2fe260e6efed68e11df744853.whissi@gentoo \
    --to=whissi@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