X-Git-Url: http://git.onelab.eu/?p=nepi.git;a=blobdiff_plain;f=src%2Fnepi%2Fresources%2Fplanetlab%2Fscripts%2Fpl-vif-up.py;h=8e9342a897c6d090f91a8be1586c8148b5aaa96f;hp=c00181cfbe8cd0547f45f4400c6a27d160c2699e;hb=cb5d027b813a27d7de263653e1a8e0cef5490f0a;hpb=da6134f8a027890f2ee477a4658163d7d79127f1 diff --git a/src/nepi/resources/planetlab/scripts/pl-vif-up.py b/src/nepi/resources/planetlab/scripts/pl-vif-up.py index c00181cf..8e9342a8 100644 --- a/src/nepi/resources/planetlab/scripts/pl-vif-up.py +++ b/src/nepi/resources/planetlab/scripts/pl-vif-up.py @@ -125,8 +125,6 @@ if __name__ == '__main__': sys.exit(1) # Saving interface name to vif_name_file - f = open(vif_name_file, 'w') - f.write(vif_name) - f.close() - + with open(vif_name_file, 'w') as f: + f.write(vif_name)