@@ -70,13 +70,17 @@ def remove(fd, name):
7070 fd , tmp = tempfile .mkstemp ()
7171 remove (fd , tmp )
7272 print ("mkstemp() [OK]" )
73+ except SystemError as e :
74+ print ("could not create tmp dir w/ mkstemp(): %s" % e )
7375except Exception as e :
7476 print ("could not create tmp dir w/ mkstemp(): %s" % e )
7577
7678try :
7779 fd , tmp = tempfile .mkstemp (prefix = "prefix-" , suffix = "-suffix" )
7880 remove (fd , tmp )
7981 print ("mkstemp(prefix='prefix-', suffix='-suffix') [OK]" )
82+ except SystemError as e :
83+ print ("1 could not create tmp dir w/ mkstemp(): %s" % e )
8084except Exception as e :
8185 print ("could not create tmp dir w/ mkstemp(prefix='prefix-', suffix='-suffix'): %s" % e )
8286
@@ -86,6 +90,8 @@ def remove(fd, name):
8690 remove (fd , tmp )
8791 os .remove (top )
8892 print ("mkstemp(prefix='prefix-', suffix='-suffix', dir=top) [OK]" )
93+ except SystemError as e :
94+ print ("2 could not create tmp dir w/ mkstemp(): %s" % e )
8995except Exception as e :
9096 print ("could not create tmp dir w/ mkstemp(prefix='prefix-', suffix='-suffix', dir=top): %s" % e )
9197
@@ -94,6 +100,8 @@ def remove(fd, name):
94100 fd , tmp = tempfile .mkstemp (prefix = "prefix-" , suffix = "-suffix" , dir = top )
95101 os .removedirs (top )
96102 print ("mkstemp(prefix='prefix-', suffix='-suffix', dir=top) [OK]" )
103+ except SystemError as e :
104+ print ("3 could not create tmp dir w/ mkstemp(): %s" % e )
97105except Exception as e :
98106 print ("could not create tmp dir w/ mkstemp(prefix='prefix-', suffix='-suffix', dir=top): %s" % e )
99107
0 commit comments