10-07-2019 10:32 AM
try:
f = open('/proc/self/ns_id', 'w')
f.write('2\n')
f.close()
run script test.py
Traceback (most recent call last):
File "/usr/local/cfg/test.py", line 20, in
vr_change('2\n')
File "/usr/local/cfg/test.py", line 16, in vr_change
f = open("/proc/self/ns_id", "w")
IOError: [Errno 2] No such file or directory: '/proc/self/ns_id'