forked from pool/python-pycurl
Accepting request 571151 from home:vitezslav_cizek:branches:devel:languages:python
- Since version 7.58.0, curl may be compiled with libssh instead of libssh2 which differ in supported functionality (bsc#1078329) * add pycurl-libssh.patch - update license OBS-URL: https://build.opensuse.org/request/show/571151 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycurl?expand=0&rev=34
This commit is contained in:
committed by
Git OBS Bridge
parent
8d7f4c29b2
commit
c1a8a0c2b5
63
pycurl-libssh.patch
Normal file
63
pycurl-libssh.patch
Normal file
@@ -0,0 +1,63 @@
|
||||
Index: pycurl-7.43.0.1/tests/ssh_key_cb_test.py
|
||||
===================================================================
|
||||
--- pycurl-7.43.0.1.orig/tests/ssh_key_cb_test.py 2017-12-03 20:03:17.000000000 +0100
|
||||
+++ pycurl-7.43.0.1/tests/ssh_key_cb_test.py 2018-01-30 16:56:42.499858079 +0100
|
||||
@@ -30,8 +30,11 @@ class SshKeyCbTest(unittest.TestCase):
|
||||
def keyfunction(known_key, found_key, match):
|
||||
return pycurl.KHSTAT_FINE
|
||||
|
||||
- self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts')
|
||||
- self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction)
|
||||
+ try:
|
||||
+ self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts')
|
||||
+ self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction)
|
||||
+ except pycurl.error as e:
|
||||
+ self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0])
|
||||
|
||||
try:
|
||||
self.curl.perform()
|
||||
@@ -44,8 +47,11 @@ class SshKeyCbTest(unittest.TestCase):
|
||||
def keyfunction(known_key, found_key, match):
|
||||
return pycurl.KHSTAT_REJECT
|
||||
|
||||
- self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts')
|
||||
- self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction)
|
||||
+ try:
|
||||
+ self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts')
|
||||
+ self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction)
|
||||
+ except pycurl.error as e:
|
||||
+ self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0])
|
||||
|
||||
try:
|
||||
self.curl.perform()
|
||||
@@ -58,8 +64,11 @@ class SshKeyCbTest(unittest.TestCase):
|
||||
def keyfunction(known_key, found_key, match):
|
||||
return 'bogus'
|
||||
|
||||
- self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts')
|
||||
- self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction)
|
||||
+ try:
|
||||
+ self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts')
|
||||
+ self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction)
|
||||
+ except pycurl.error as e:
|
||||
+ self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0])
|
||||
|
||||
try:
|
||||
self.curl.perform()
|
||||
@@ -77,8 +86,14 @@ class SshKeyCbUnsetTest(unittest.TestCas
|
||||
|
||||
@util.min_libcurl(7, 19, 6)
|
||||
def test_keyfunction_none(self):
|
||||
- self.curl.setopt(pycurl.SSH_KEYFUNCTION, None)
|
||||
+ try:
|
||||
+ self.curl.setopt(pycurl.SSH_KEYFUNCTION, None)
|
||||
+ except pycurl.error as e:
|
||||
+ self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0])
|
||||
|
||||
@util.min_libcurl(7, 19, 6)
|
||||
def test_keyfunction_unset(self):
|
||||
- self.curl.unsetopt(pycurl.SSH_KEYFUNCTION)
|
||||
+ try:
|
||||
+ self.curl.unsetopt(pycurl.SSH_KEYFUNCTION)
|
||||
+ except pycurl.error as e:
|
||||
+ self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0])
|
Reference in New Issue
Block a user