tests/printrepr.py
author Mads Kiilerich <mads@kiilerich.com>
Sun, 17 Oct 2010 04:14:06 +0200
changeset 12742 6ab4a7d3c179
parent 10263 25e572394f5c
permissions -rwxr-xr-x
url: validity (notBefore/notAfter) is checked by OpenSSL (issue2407) Removing the check from our code makes https with cacerts check work with Python < 2.6.

#!/usr/bin/env python
#
# Copyright 2009 Matt Mackall <mpm@selenic.com> and others
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.

"""prints repr(sys.stdin) but preserves newlines in input"""

import sys
print repr(sys.stdin.read())[1:-1].replace('\\n', '\n'),