Commits
Darrell Schiebel authored and Sandra Castro committed ea623b868f4 Merge
99 99 | try: |
100 100 | from casatoolrc import * |
101 101 | except: |
102 102 | try: |
103 103 | f = open(configrc) |
104 104 | except IOError: |
105 105 | pass |
106 106 | else: |
107 107 | f.close() |
108 108 | try: |
109 - | exec(open(configrc).read( )) |
109 + | with open(configrc) as rc: |
110 + | exec(rc.read( )) |
110 111 | except: |
111 112 | sys.stderr.write("error: evaluation of %s failed\n" % configrc) |