summaryrefslogtreecommitdiff
path: root/tic/utils/file.py
diff options
context:
space:
mode:
Diffstat (limited to 'tic/utils/file.py')
-rw-r--r--tic/utils/file.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tic/utils/file.py b/tic/utils/file.py
index 08952f0..1cf49cb 100644
--- a/tic/utils/file.py
+++ b/tic/utils/file.py
@@ -59,14 +59,14 @@ def make_dirs(path):
def write(path, data):
# make directory
make_dirs(os.path.dirname(path))
- with(open(path, 'w')) as f:
+ with open(path, 'w') as f:
f.write(data)
def write_json_flock(path, data):
try:
make_dirs(os.path.dirname(path))
with FileLock(path):
- with(open(path, 'w')) as f:
+ with open(path, 'w') as f:
f.write(json.dumps(data))
except OSError as e:
if e.errno != errno.EEXIST:
@@ -84,7 +84,7 @@ def read_json(path):
return ret
def decompress_gzip(intput_path, output_path):
- with(gzip.open(intput_path, 'rb')) as fobj:
+ with gzip.open(intput_path, 'rb') as fobj:
f = open(output_path, 'wb')
f.write(fobj.read())
f.close()