Skip to contentSkip to conversation

Python next patches

GIT PULL Applied Eduardo Habkost 2 participants 4 messages Sep 22, 2017

lore
Share & tools
lore
#0 lore raw

The following changes since commit 9ee660e7c138595224b65ddc1c5712549f0a278c:

Merge remote-tracking branch 'remotes/yongbok/tags/mips-20170921' into staging (2017-09-21 14:40:32 +0100)

are available in the git repository at:

git://github.com/ehabkost/qemu.git tags/python-next-pull-request

for you to fetch changes up to ad904f6689f1ced282b413cb904c166f294a73ee:

MAINTAINERS: Add Python scripts (2017-09-22 11:39:55 -0300)

----------------------------------------------------------------
Python queue, 2017-09-22

* MAINTAINERS update
* Fix logging issue on test scripts using qemu.py

----------------------------------------------------------------

Eduardo Habkost (2):
qemu.py: Call logging.basicConfig() automatically
MAINTAINERS: Add Python scripts

 scripts/qemu.py | 3 +++
 MAINTAINERS     | 8 ++++++++
 2 files changed, 11 insertions(+)
Signature · 1 line
2.13.5
#1 lore raw

[Qemu-devel] [PULL 1/2] qemu.py: Call logging.basicConfig() automatically

Not all scripts using qemu.py configure the Python logging module, and end up generating a "No handlers could be found for logger" message instead of actual log messages.

To avoid requiring every script using qemu.py to configure logging manually, call basicConfig() when creating a QEMUMachine object. This won't affect scripts that already set up logging, but will ensure that scripts that don't configure logging keep working.

Fixes 4738b0a85a0c2031fddc71b51cccebce0c4ba6b1

Message-Id: <[email protected]>

---
 scripts/qemu.py | 3 +++
 1 file changed, 3 insertions(+)
scripts/qemu.py +3 -0
index 5e02dd8e78..73d6031e02 100644
@@ -89,6 +89,9 @@ class QEMUMachine(object):
         self._qmp = None
         self._qemu_full_args = None
 
+        # just in case logging wasn't configured by the main script:
+        logging.basicConfig(level=(logging.DEBUG if debug else logging.WARN))
+
     def __enter__(self):
         return self
 
Signature · 1 line
2.13.5
#2 lore raw

[Qemu-devel] [PULL 2/2] MAINTAINERS: Add Python scripts

In reply to Eduardo Habkost

Cleber and I are volunteering to review and queue patches for the Python scripts and modules in scripts/.

I'm setting "M: Odd fixes" because not all scripts are actively maintained.

Message-Id: <[email protected]>

[ehabkost: add tests/*.py too]
---
 MAINTAINERS | 8 ++++++++
 1 file changed, 8 insertions(+)
MAINTAINERS +8 -0
index e511ba780f..d3e91496b8 100644
@@ -1403,6 +1403,14 @@ S: Maintained
 F: include/sysemu/cryptodev*.h
 F: backends/cryptodev*.c
 
+Python scripts
+M: Eduardo Habkost <[email protected]>
+M: Cleber Rosa <[email protected]>
+S: Odd fixes
+F: scripts/qmp/*
+F: scripts/*.py
+F: tests/*.py
+
 QAPI
 M: Markus Armbruster <[email protected]>
 M: Michael Roth <[email protected]>
Signature · 1 line
2.13.5
#3 lore raw
In reply to Eduardo Habkost
Quoted 20 lines · Eduardo Habkost

The following changes since commit 9ee660e7c138595224b65ddc1c5712549f0a278c:

Merge remote-tracking branch 'remotes/yongbok/tags/mips-20170921' into staging (2017-09-21 14:40:32 +0100)

are available in the git repository at:

git://github.com/ehabkost/qemu.git tags/python-next-pull-request

for you to fetch changes up to ad904f6689f1ced282b413cb904c166f294a73ee:

MAINTAINERS: Add Python scripts (2017-09-22 11:39:55 -0300)

----------------------------------------------------------------
Python queue, 2017-09-22

* MAINTAINERS update
* Fix logging issue on test scripts using qemu.py

----------------------------------------------------------------

Quoted 7 lines

Eduardo Habkost (2):
qemu.py: Call logging.basicConfig() automatically
MAINTAINERS: Add Python scripts

 scripts/qemu.py | 3 +++
 MAINTAINERS     | 8 ++++++++
 2 files changed, 11 insertions(+)

Applied, thanks.

-- PMM