pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
py-cvss: Add a patch to gracefully handle possible ^D treating it like ^C
Module Name: pkgsrc-wip
Committed By: Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By: leot
Date: Thu Jun 21 10:28:45 2018 +0200
Changeset: 4d9da8f59de04f71d436efb32cc8b2d8ddfe49fd
Modified Files:
py-cvss/distinfo
Added Files:
py-cvss/patches/patch-cvss_interactive.py
Log Message:
py-cvss: Add a patch to gracefully handle possible ^D treating it like ^C
Apart ^C often on Unix utilities it is handy to exit via just a ^D, gracefully
handle that in cvss_calculator and treat it the same way of ^C.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4d9da8f59de04f71d436efb32cc8b2d8ddfe49fd
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
py-cvss/distinfo | 1 +
py-cvss/patches/patch-cvss_interactive.py | 18 ++++++++++++++++++
2 files changed, 19 insertions(+)
diffs:
diff --git a/py-cvss/distinfo b/py-cvss/distinfo
index 358ce9d834..1f9cf03d45 100644
--- a/py-cvss/distinfo
+++ b/py-cvss/distinfo
@@ -4,5 +4,6 @@ SHA1 (cvss-1.7.tar.gz) = 76ebd64e66783ce615db34ac46a67674bca0934e
RMD160 (cvss-1.7.tar.gz) = 3e32f253d4cbe91696fc13cda29a77878eaa52f6
SHA512 (cvss-1.7.tar.gz) = e2437afd1cd3aceb5884fc1d3203d9be0308591dbecbecaa3c8284f22efc6703797cc75ecaf79e136f3b987562552cccd6b4092b3354d05e9de0bbd97dfc57e0
Size (cvss-1.7.tar.gz) = 3178715 bytes
+SHA1 (patch-cvss_interactive.py) = 8438eb1c80592ccf3addb38c077e89c7e4167999
SHA1 (patch-tests_test__cvss2.py) = 9f1c51bf48d944b30bbe58cd3e3e232325e28f99
SHA1 (patch-tests_test__cvss3.py) = 83de56438bf4a95b1737cc48fd4bba6ab553d54e
diff --git a/py-cvss/patches/patch-cvss_interactive.py b/py-cvss/patches/patch-cvss_interactive.py
new file mode 100644
index 0000000000..50d4071e2a
--- /dev/null
+++ b/py-cvss/patches/patch-cvss_interactive.py
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Gracefully handle possible ^D and treat it like a ^C.
+
+--- cvss/interactive.py.orig 2018-06-21 08:24:26.154082541 +0000
++++ cvss/interactive.py
+@@ -95,7 +95,10 @@ def ask_interactively(version=3, all_met
+ while True:
+ print(METRICS_ABBREVIATIONS[metric] + ':', end=' ')
+ print('/'.join(values), end=' ')
+- input_value = string_input().upper()
++ try:
++ input_value = string_input().upper()
++ except EOFError:
++ raise KeyboardInterrupt('EOF')
+ if not input_value:
+ if version == 2:
+ input_value = 'ND'
Home |
Main Index |
Thread Index |
Old Index