]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
misc: Fix close() call to pass in fd
authorSam Lang <sam.lang@inktank.com>
Mon, 15 Apr 2013 21:26:22 +0000 (16:26 -0500)
committerSam Lang <sam.lang@inktank.com>
Mon, 15 Apr 2013 21:26:22 +0000 (16:26 -0500)
fd is an int, we need to use os.close().

Signed-off-by: Sam Lang <sam.lang@inktank.com>
teuthology/misc.py

index 12351aebf5c190ff7fb990bbabca3bc4ad4224d3..13f60a31d8248d1e4906d3a3f78e5ef2a2ae69f6 100644 (file)
@@ -421,7 +421,7 @@ def remote_mktemp(remote, sudo=False):
     args.extend([
             'python',
             '-c',
-            'import os; import tempfile; (fd,fname) = tempfile.mkstemp(); fd.close(); print fname.rstrip()'
+            'import os; import tempfile; (fd,fname) = tempfile.mkstemp(); os.close(fd); print fname.rstrip()'
             ])
     proc = remote.run(
         args=args,