summaryrefslogtreecommitdiffstats
path: root/scratch.py
blob: 62bf00e4742fd3b145c12ccc77b82a2662012b8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import sys
import time

class Baz:
    def hello(self):
        print(foo)

if True:
  foo = 'bar'

print("hello, {0}".format('world!'))
c = Baz()
c.hello()



success = False
retry = 3
while not success and retry > 0:
  try:
    #raise Exception('my')
    success = True
  except Exception as e:
    print(e, file=sys.stderr)
    time.sleep(1)
    retry = retry - 1