Skip to content

Commit e979419

Browse files
authored
Merge pull request #149 from AnguseZhang/devel
Remove os.mknod in deepmd/{raw.py,comp.py}
2 parents a499a42 + d91af65 commit e979419

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

dpdata/deepmd/comp.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,6 @@ def dump(folder,
110110
except OSError:
111111
pass
112112
if data.get("nopbc", False):
113-
os.mknod(os.path.join(folder, "nopbc"))
113+
with open(os.path.join(folder, "nopbc"), "w") as fw_nopbc:
114+
pass
114115

dpdata/deepmd/raw.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,6 @@ def dump (folder, data) :
7474
except OSError:
7575
pass
7676
if data.get("nopbc", False):
77-
os.mknod(os.path.join(folder, "nopbc"))
77+
with open(os.path.join(folder, "nopbc"), "w") as fw_nopbc:
78+
pass
7879

0 commit comments

Comments
 (0)