Browse Source

print() is a function in Python 3

pull/110/head
Christian Clauss 5 years ago
committed by GitHub
parent
commit
8f999fdba8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      run_fake_soap_server.py

4
run_fake_soap_server.py

@ -2,6 +2,7 @@
"""Este script deve ser executado com Python 2.6+ e OpenSSL""" """Este script deve ser executado com Python 2.6+ e OpenSSL"""
from __future__ import print_function
import os, datetime import os, datetime
CUR_DIR = os.path.dirname(os.path.abspath(__file__)) CUR_DIR = os.path.dirname(os.path.abspath(__file__))
@ -39,7 +40,7 @@ class HandlerStatusServico(tornado.web.RequestHandler):
tag = extrair_tag(raiz.getroot().getchildren()[0].getchildren()[0]) tag = extrair_tag(raiz.getroot().getchildren()[0].getchildren()[0])
# Chama o método respectivo para a tag # Chama o método respectivo para a tag
print 'Metodo:', tag
print('Metodo:', tag)
getattr(self, tag)(raiz) getattr(self, tag)(raiz)
def nfeStatusServicoNF2(self, raiz): def nfeStatusServicoNF2(self, raiz):
@ -92,4 +93,3 @@ if __name__ == '__main__':
http_server = tornado.httpserver.HTTPServer(application, ssl_options=ssl_options) http_server = tornado.httpserver.HTTPServer(application, ssl_options=ssl_options)
http_server.listen(porta) http_server.listen(porta)
tornado.ioloop.IOLoop.instance().start() tornado.ioloop.IOLoop.instance().start()
Loading…
Cancel
Save