diff options
author | Christian Heimes <christian@python.org> | 2019-04-14 13:58:09 +0200 |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2019-04-14 13:58:09 +0200 |
commit | d46e04fcf6b51f771b671ebf869988b0677bec73 (patch) | |
tree | 148e8f14ad6d38ae120b53e6b57c4ad7db5a8cc5 /other/python_external.py | |
parent | c67738d61dabc1a410f7760f23cb5b3108ac4c30 (diff) | |
download | defusedxml-git-d46e04fcf6b51f771b671ebf869988b0677bec73.tar.gz |
Reformat all code with black 18.9b0
Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'other/python_external.py')
-rwxr-xr-x | other/python_external.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/other/python_external.py b/other/python_external.py index 7c5ab0c..2926c67 100755 --- a/other/python_external.py +++ b/other/python_external.py @@ -3,7 +3,8 @@ Author: Christian Heimes """ -import sys +from __future__ import print_function + from xml.sax import ContentHandler from xml.sax import parseString @@ -41,7 +42,7 @@ class WeatherHandler(ContentHandler): def characters(self, content): if self.tag == "processing": - self.city.append(content) + self.city.append(content) def weatherResponse(xml): @@ -52,6 +53,7 @@ def weatherResponse(xml): else: return "<error>Unknown city %s</error>" % handler.city[:500] + for xml in (xml_good, xml_bad_file, xml_bad_url): print("\nREQUEST:\n--------") print(xml) |