Fixed problem with json-dict opening json files
Getty Ritter
9 years ago
8 | 8 |
if not arg: return None
|
9 | 9 |
if arg[0] == '@':
|
10 | 10 |
try:
|
11 | |
with open(arg[0]) as f: return coerce(f.read())
|
| 11 |
with open(arg[1:]) as f: return coerce(f.read())
|
12 | 12 |
except: pass
|
13 | 13 |
if arg == '-': return coerce(sys.stdin.read())
|
14 | 14 |
try: return yaml.loads(arg)
|