Ticket #20584: 0001-Use-the-new-style-of-catching-exceptions.patch

File 0001-Use-the-new-style-of-catching-exceptions.patch, 760 bytes (added by cypherpunks, 3 years ago)
  • docs/_static/example/reading_twitter.py

    From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
    From: cypherpunks <cypherpunks@torproject.org>
    Date: Fri, 4 Nov 2016 10:42:02 +0000
    Subject: [PATCH 1/4] Use the new style of catching exceptions
    
    ---
     docs/_static/example/reading_twitter.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/docs/_static/example/reading_twitter.py b/docs/_static/example/reading_twitter.py
    index 28f840d..7f9094b 100644
    a b try: 
    8181    print("%i. %s" % (index + 1, tweet["created_at"]))
    8282    print(tweet["text"])
    8383    print("")
    84 except IOError, exc:
     84except IOError as exc:
    8585  print(exc)
    8686finally:
    8787  tor_process.kill()  # stops tor