[Python-modules-commits] [txwinrm] 06/09: merge patched into master
Christopher Stuart Hoskin
mans0954 at moszumanska.debian.org
Mon Jun 26 01:47:00 UTC 2017
This is an automated email from the git hooks/post-receive script.
mans0954 pushed a commit to branch master
in repository txwinrm.
commit beba1ea39f37c3ffd4a6fcebd4c83b9e09589d3b
Merge: 89dfd70 6fd9914
Author: Christopher Hoskin <mans0954 at debian.org>
Date: Mon Jun 26 02:25:54 2017 +0100
merge patched into master
debian/.git-dpm | 6 +-
...lls-pykerberos-kerberos-we-want-the-defau.patch | 4 +-
debian/patches/0002-Fix-tests.patch | 4 +-
debian/patches/0003-Wecutil-Argument-Bug.patch | 2 +-
setup.py | 2 +-
txwinrm/SessionManager.py | 6 +-
txwinrm/WinRMClient.py | 148 ++++++++++-----------
txwinrm/app.py | 4 +-
txwinrm/krb5.py | 42 ++++--
txwinrm/shell.py | 108 ++++++++++++---
txwinrm/util.py | 60 ++++++---
11 files changed, 239 insertions(+), 147 deletions(-)
diff --cc debian/.git-dpm
index 3596727,0000000..c823cbe
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
+# see git-dpm(1) from git-dpm package
- 47d558c472623c5bfa8ed30906a9811810ef7c2f
- 47d558c472623c5bfa8ed30906a9811810ef7c2f
- 82c0f6be59bfc0d73db331c87a09eb2b6e14f6d0
++6fd99141ba98be37f3643bf8055126b409cdf7c3
++6fd99141ba98be37f3643bf8055126b409cdf7c3
++725ae9c1a9a2e5be561af17bc361181305870603
+725ae9c1a9a2e5be561af17bc361181305870603
+txwinrm_1.2.20.orig.tar.gz
+7eda17f23686ce3889037dedc9462d4bfa435b43
+293352
+debianTag="debian/%e%v"
+patchedTag="patched/%e%v"
+upstreamTag="upstream/%e%u"
diff --cc debian/patches/0001-Upstream-calls-pykerberos-kerberos-we-want-the-defau.patch
index c8510c5,0000000..f9bc784
mode 100644,000000..100644
--- a/debian/patches/0001-Upstream-calls-pykerberos-kerberos-we-want-the-defau.patch
+++ b/debian/patches/0001-Upstream-calls-pykerberos-kerberos-we-want-the-defau.patch
@@@ -1,22 -1,0 +1,22 @@@
- From 443dc3ecee4d502469a6f0a2e536bfc371186c61 Mon Sep 17 00:00:00 2001
++From 6cfcd1856b5d1ecb511771601ea2ef4ab1035802 Mon Sep 17 00:00:00 2001
+From: Christopher Hoskin <christopher.hoskin at gmail.com>
+Date: Fri, 29 Jul 2016 21:43:39 +0100
+Subject: Upstream calls pykerberos kerberos, we want the default name
+
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
- index b0b2ba7..2287270 100755
++index 28b475e..9ee7008 100755
+--- a/setup.py
++++ b/setup.py
+@@ -29,7 +29,7 @@ setup_kwargs = dict(
+
+ try:
+ from setuptools import setup
+- setup_kwargs['install_requires'] = ['twisted', 'kerberos', 'pyOpenSSL']
++ setup_kwargs['install_requires'] = ['twisted', 'pykerberos', 'pyOpenSSL']
+ try:
+ import argparse
+ if False:
diff --cc debian/patches/0002-Fix-tests.patch
index dad3351,0000000..10bf07c
mode 100644,000000..100644
--- a/debian/patches/0002-Fix-tests.patch
+++ b/debian/patches/0002-Fix-tests.patch
@@@ -1,122 -1,0 +1,122 @@@
- From 58694f63ac79cb866dde696da175c59ee232363a Mon Sep 17 00:00:00 2001
++From e8f92a5cbc1aeababcb43e40ea71433c74c19177 Mon Sep 17 00:00:00 2001
+From: Christopher Hoskin <christopher.hoskin at gmail.com>
+Date: Fri, 29 Jul 2016 21:46:55 +0100
+Subject: Fix tests
+
+---
+ setup.py | 1 +
+ txwinrm/enumerate.py | 8 ++++----
+ txwinrm/test/test_shell.py | 12 ++++++++----
+ 3 files changed, 13 insertions(+), 8 deletions(-)
+
+diff --git a/setup.py b/setup.py
- index 2287270..8de0704 100755
++index 9ee7008..71f9c1b 100755
+--- a/setup.py
++++ b/setup.py
+@@ -20,6 +20,7 @@ setup_kwargs = dict(
+ url='https://github.com/zenoss/txwinrm',
+ packages=['txwinrm', 'txwinrm.request'],
+ package_data={'txwinrm.request': ['*.xml']},
++ test_suite='txwinrm.test',
+ scripts=[
+ 'scripts/winrm',
+ 'scripts/winrs',
+diff --git a/txwinrm/enumerate.py b/txwinrm/enumerate.py
+index 8e379cb..78b3d50 100755
+--- a/txwinrm/enumerate.py
++++ b/txwinrm/enumerate.py
+@@ -325,7 +325,7 @@ class TextBufferingContentHandler(sax.handler.ContentHandler):
+ This implementation saves the text from the buffer. Then it resets and
+ truncates the buffer.
+ """
+- self._text = self._buffer.getvalue()
++ self._text = self._buffer.getvalue().decode('utf-8')
+ self._reset_truncate()
+
+ def characters(self, content):
+@@ -335,7 +335,7 @@ class TextBufferingContentHandler(sax.handler.ContentHandler):
+
+ This implementation writes to the buffer.
+ """
+- self._buffer.write(content)
++ self._buffer.write(content.encode('utf-8'))
+
+ def _reset_truncate(self):
+ self._buffer.reset()
+@@ -599,7 +599,7 @@ class ItemsContentHandler(sax.handler.ContentHandler):
+ This instance manipulates the tag stack, creating a new instance if
+ it's length is 1. Saves value as None if the nil attribute is present.
+ """
+- log.debug('ItemsContentHandler startElementNS {0} v="{1}" t="{2}" {3}'
++ log.debug(u'ItemsContentHandler startElementNS {0} v="{1}" t="{2}" {3}'
+ .format(name, self._value, self._text_buffer.text,
+ self._tag_stack))
+ tag = create_tag_comparer(name)
+@@ -624,7 +624,7 @@ class ItemsContentHandler(sax.handler.ContentHandler):
+ the text as a date and saves it for later use when the properties
+ element is closed.
+ """
+- log.debug('ItemsContentHandler endElementNS {0} v="{1}" t="{2}" {3}'
++ log.debug(u'ItemsContentHandler endElementNS {0} v="{1}" t="{2}" {3}'
+ .format(name, self._value, self._text_buffer.text,
+ self._tag_stack))
+ tag = create_tag_comparer(name)
+diff --git a/txwinrm/test/test_shell.py b/txwinrm/test/test_shell.py
+index 245a187..7210ea4 100644
+--- a/txwinrm/test/test_shell.py
++++ b/txwinrm/test/test_shell.py
+@@ -16,6 +16,7 @@ from .tools import create_get_elem_func
+ from ..shell import _build_command_line_elem, _stripped_lines, \
+ _find_shell_id, _find_command_id, _find_stream, _find_exit_code, \
+ CommandResponse, SingleShotCommand, LongRunningCommand, Typeperf
++from ..util import EtreeRequestSender, ConnectionInfo
+
+ DATADIR = os.path.join(
+ os.path.dirname(os.path.abspath(__file__)), "data_shell")
+@@ -36,6 +37,7 @@ class FakeRequestSender(object):
+
+ hostname = 'fake_host'
+ _receive_resp = 'receive_resp_01.xml'
++ _conn_info = ConnectionInfo("10.30.50.34", "kerberos", "rbooth at SOLUTIONS.LOC", "", "http", 5985, "Keep-Alive", "/home/zenoss/rbooth.keytab", '')
+
+ def send_request(self, request_template_name, **kwargs):
+ elem = None
+@@ -50,8 +52,10 @@ class FakeRequestSender(object):
+ elem = get_elem(self._receive_resp)
+ self._receive_resp = 'receive_resp_02.xml'
+
+- return defer.succeed(elem)
++ return defer.returnValue(elem)
+
++ def close_connections(self):
++ return defer.succeed(None)
+
+ class TestBuildCommandLineElem(unittest.TestCase):
+
+@@ -148,7 +152,7 @@ class TestSingleShotCommand(unittest.TestCase):
+
+ @defer.inlineCallbacks
+ def test_run_command(self):
+- command = SingleShotCommand(FakeRequestSender())
++ command = SingleShotCommand(EtreeRequestSender(FakeRequestSender()))
+ cmd_response = yield command.run_command('foo')
+ self.assertEqual(cmd_response.exit_code, 0)
+ self.assertEqual(cmd_response.stderr, [])
+@@ -163,7 +167,7 @@ class TestSingleShotCommand(unittest.TestCase):
+ class TestLongRunningCommand(unittest.TestCase):
+
+ def setUp(self):
+- self._command = LongRunningCommand(FakeRequestSender())
++ self._command = LongRunningCommand(EtreeRequestSender(FakeRequestSender()))
+
+ def tearDown(self):
+ self._command = None
+@@ -202,7 +206,7 @@ class TestLongRunningCommand(unittest.TestCase):
+ class TestTypeperf(unittest.TestCase):
+
+ def setUp(self):
+- self._command = Typeperf(LongRunningCommand(FakeRequestSender()))
++ self._command = Typeperf(LongRunningCommand(EtreeRequestSender(FakeRequestSender())))
+
+ def tearDown(self):
+ self._command = None
diff --cc debian/patches/0003-Wecutil-Argument-Bug.patch
index 4ec3a48,0000000..8456dc8
mode 100644,000000..100644
--- a/debian/patches/0003-Wecutil-Argument-Bug.patch
+++ b/debian/patches/0003-Wecutil-Argument-Bug.patch
@@@ -1,27 -1,0 +1,27 @@@
- From 47d558c472623c5bfa8ed30906a9811810ef7c2f Mon Sep 17 00:00:00 2001
++From 6fd99141ba98be37f3643bf8055126b409cdf7c3 Mon Sep 17 00:00:00 2001
+From: Christopher Hoskin <christopher.hoskin at gmail.com>
+Date: Sat, 30 Jul 2016 09:47:09 +0100
+Subject: Wecutil Argument Bug
+
+Bug: https://github.com/zenoss/txwinrm/issues/82
+Forwarded: https://github.com/zenoss/txwinrm/pull/109
+Last-Update: 2017-02-25
+---
+ txwinrm/wecutil.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/txwinrm/wecutil.py b/txwinrm/wecutil.py
+index e456e14..557bd53 100644
+--- a/txwinrm/wecutil.py
++++ b/txwinrm/wecutil.py
+@@ -90,8 +90,8 @@ class WecutilStrategy(object):
+ class WecUtility(app.ConfigDrivenUtility):
+
+ def add_args(self, parser):
+- parser.add_argument("--path", "-p", default='Application')
+- parser.add_argument("--select", "-s", default='*')
++ parser.add_argument("--path", "-t", default='Application')
++ parser.add_argument("--select", "-l", default='*')
+ parser.add_argument("--num-pulls", "-n", type=int, default=2)
+
+ def check_args(self, args):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/txwinrm.git
More information about the Python-modules-commits
mailing list