Mercurial > templog
comparison py/params.py @ 231:e39ed85d87a5
fix a few python3 issues
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 11 Apr 2015 00:16:05 +0800 |
parents | 185621f47040 |
children | 19569cb5ed46 |
comparison
equal
deleted
inserted
replaced
230:185621f47040 | 231:e39ed85d87a5 |
---|---|
34 self[k] = v | 34 self[k] = v |
35 | 35 |
36 def load(self, f = None): | 36 def load(self, f = None): |
37 if not f: | 37 if not f: |
38 try: | 38 try: |
39 f = file(config.PARAMS_FILE, 'r') | 39 f = open(config.PARAMS_FILE, 'r') |
40 except IOError as e: | 40 except IOError as e: |
41 W("Missing parameter file, using defaults. %s", e) | 41 W("Missing parameter file, using defaults. %s", e) |
42 return | 42 return |
43 try: | 43 try: |
44 u = json.load(f) | 44 u = json.load(f) |