[Python-modules-commits] [python-hpilo] 01/05: Import python-hpilo_3.9.orig.tar.gz

Sandro Tosi morph at moszumanska.debian.org
Sat Dec 17 03:21:31 UTC 2016


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository python-hpilo.

commit 7af3db3eadc44b0754f0a82e92ff9e298ff84772
Author: Sandro Tosi <morph at debian.org>
Date:   Fri Dec 16 22:16:32 2016 -0500

    Import python-hpilo_3.9.orig.tar.gz
---
 CHANGES        |  5 +++++
 PKG-INFO       |  2 +-
 docs/conf.py   |  4 ++--
 docs/shell.rst |  2 +-
 hpilo.py       | 11 ++++++-----
 hpilo_fw.py    |  5 ++---
 setup.py       |  2 +-
 7 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/CHANGES b/CHANGES
index 69b8a8e..477621a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+Version 3.9, 2016-10-27
+* Several small bugfixes
+* firmware downloader updated for the hp -> hp enterprise move
+* Python 3 compatibility improved
+
 Version 3.8, 2016-04-26
 * Improved python 3 compatibility
 * More compact XML in delayed mode to make resets and changes more cooperative
diff --git a/PKG-INFO b/PKG-INFO
index 0901091..086d744 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: python-hpilo
-Version: 3.8
+Version: 3.9
 Summary: iLO automation from python or shell
 Home-page: http://github.com/seveas/python-hpilo
 Author: Dennis Kaarsemaker
diff --git a/docs/conf.py b/docs/conf.py
index 38e4887..2e5351b 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -50,9 +50,9 @@ copyright = u'2011-2016, Dennis Kaarsemaker'
 # built documents.
 #
 # The short X.Y version.
-version = '3.8'
+version = '3.9'
 # The full version, including alpha/beta/rc tags.
-release = '3.8'
+release = '3.9'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/docs/shell.rst b/docs/shell.rst
index a755795..870551d 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -58,7 +58,7 @@ specified as :data:`key=value` pairs on the command-line. These parameters can
 also point to arbitrary configuration variables using the
 :attr:`key='$section.option'` syntax.
 
-Finally, you can also call multiple methds at once by separating them with a
+Finally, you can also call multiple methods at once by separating them with a
 :data:`+`
 
 Examples
diff --git a/hpilo.py b/hpilo.py
index bb38343..1290ea9 100644
--- a/hpilo.py
+++ b/hpilo.py
@@ -1,7 +1,7 @@
 # (c) 2011-2016 Dennis Kaarsemaker <dennis at kaarsemaker.net>
 # see COPYING for license details
 
-__version__ = "3.8"
+__version__ = "3.9"
 
 import codecs
 import os
@@ -373,7 +373,8 @@ class Ilo(object):
                     self.output.close()
                 shutdown = lambda *args: None
             sock = FakeSocket(self.read_response, self.save_request)
-            self.protocol = sock.protocol
+            if self.read_response:
+                self.protocol = sock.protocol
             return sock
 
         if self.protocol == ILO_LOCAL:
@@ -428,7 +429,7 @@ class Ilo(object):
         sock = self._get_socket()
         if self.read_response:
             protocol = sock.protocol
-        msglen = msglen_ = len(self.XML_HEADER + xml)
+        msglen = len(self.XML_HEADER + xml)
         if protocol == ILO_HTTP:
             extra_header = ''
             if self.cookie:
@@ -1492,8 +1493,8 @@ class Ilo(object):
             del vars['dir_kerberos_keytab']
 
         elements = []
-        for key, val in vars.iteritems():
-            if not val:
+        for key, val in vars.items():
+            if val is None:
                 continue
             if key.endswith('_priv'):
                 if isinstance(val, basestring):
diff --git a/hpilo_fw.py b/hpilo_fw.py
index 1f2c619..35811ca 100644
--- a/hpilo_fw.py
+++ b/hpilo_fw.py
@@ -62,10 +62,10 @@ def download(ilo, path=None, progress = lambda txt: None):
     return False
 
 def parse(fwfile, ilo):
-    fd = open(fwfile)
+    fd = open(fwfile, 'rb')
     data = fd.read()
     fd.close()
-    if '_SKIP=' in data:
+    if b('_SKIP=') in data:
         # scexe file
         fwfile = _parse(data, os.getcwd())
     return fwfile
@@ -98,7 +98,6 @@ def _parse(scexe, path, filename=None):
 
     tf = tarfile.open(name="bogus_name_for_old_python_versions", fileobj=BytesIO(tarball), mode='r:gz')
     filenames = [x for x in tf.getnames() if x.endswith('.bin')]
-    orig_filename = filename
     if not filename or filename not in filenames:
         if len(filenames) != 1:
             raise ValueError("scexe file seems corrupt")
diff --git a/setup.py b/setup.py
index ff514ac..4b9cba3 100755
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
 from distutils.core import setup
 
 setup(name = "python-hpilo",
-      version = "3.8",
+      version = "3.9",
       author = "Dennis Kaarsemaker",
       author_email = "dennis at kaarsemaker.net",
       url = "http://github.com/seveas/python-hpilo",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-hpilo.git



More information about the Python-modules-commits mailing list