From: Thomas Goirand Date: Fri, 24 Apr 2015 09:42:25 +0000 (+0200) Subject: Fixed stderr. X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=77e6dd6a23b9f57ca7e88309a659192d497a8907;p=packages%2Ftrusty%2Fpython-pysaml2.git Fixed stderr. Rewritten-From: 72c0a241561370510d61440ce997ced3ca0c49cf --- diff --git a/debian/patches/fixes-python2-to-python3-print-style.patch b/debian/patches/fixes-python2-to-python3-print-style.patch index e48fdd2..bf75865 100644 --- a/debian/patches/fixes-python2-to-python3-print-style.patch +++ b/debian/patches/fixes-python2-to-python3-print-style.patch @@ -42,7 +42,7 @@ Last-Update: 2015-04-24 #_err = exception_trace("RUN", err) #logging.error(exception_trace("RUN", _err)) - print >> sys.stderr, err -+ print(err, file=sys.stderr) ++ print(err) resp = ServiceError("%s" % err) return resp(environ, start_response) @@ -162,7 +162,7 @@ Last-Update: 2015-04-24 - print >> sys.stderr, \ - "Duplicated Entity descriptor (entity id: '%s')" % \ - entity_descr.entity_id -+ print("Duplicated Entity descriptor (entity id: '%s')" % entity_descr.entity_id, file=sys.stderr) ++ print("Duplicated Entity descriptor (entity id: '%s')" % entity_descr.entity_id) return _ent = to_dict(entity_descr, self.onts) @@ -288,7 +288,7 @@ Last-Update: 2015-04-24 idb = shelve.open(dbspec, writeback=True) else: # database spec is a a 2-tuple (type, address) - #print >> sys.stderr, "DBSPEC: %s" % (dbspec,) -+ #print("DBSPEC: %s" % (dbspec,), file=sys.stderr) ++ #print("DBSPEC: %s" % (dbspec,)) (typ, addr) = dbspec if typ == "shelve": idb = shelve.open(addr, writeback=True) @@ -403,7 +403,7 @@ Last-Update: 2015-04-24 elem = TIME_FORMAT_WITH_FRAGMENT.match(timestr) except Exception, exc: - print >> sys.stderr, "Exception: %s on %s" % (exc, timestr) -+ print("Exception: %s on %s" % (exc, timestr), file=sys.stderr) ++ print("Exception: %s on %s" % (exc, timestr)) raise then = time.strptime(elem.groups()[0] + "Z", TIME_FORMAT)