@@ -70,13 +70,17 @@ def remove(fd, name):
70
70
fd , tmp = tempfile .mkstemp ()
71
71
remove (fd , tmp )
72
72
print ("mkstemp() [OK]" )
73
+ except SystemError as e :
74
+ print ("could not create tmp dir w/ mkstemp(): %s" % e )
73
75
except Exception as e :
74
76
print ("could not create tmp dir w/ mkstemp(): %s" % e )
75
77
76
78
try :
77
79
fd , tmp = tempfile .mkstemp (prefix = "prefix-" , suffix = "-suffix" )
78
80
remove (fd , tmp )
79
81
print ("mkstemp(prefix='prefix-', suffix='-suffix') [OK]" )
82
+ except SystemError as e :
83
+ print ("1 could not create tmp dir w/ mkstemp(): %s" % e )
80
84
except Exception as e :
81
85
print ("could not create tmp dir w/ mkstemp(prefix='prefix-', suffix='-suffix'): %s" % e )
82
86
@@ -86,6 +90,8 @@ def remove(fd, name):
86
90
remove (fd , tmp )
87
91
os .remove (top )
88
92
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 )
89
95
except Exception as e :
90
96
print ("could not create tmp dir w/ mkstemp(prefix='prefix-', suffix='-suffix', dir=top): %s" % e )
91
97
@@ -94,6 +100,8 @@ def remove(fd, name):
94
100
fd , tmp = tempfile .mkstemp (prefix = "prefix-" , suffix = "-suffix" , dir = top )
95
101
os .removedirs (top )
96
102
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 )
97
105
except Exception as e :
98
106
print ("could not create tmp dir w/ mkstemp(prefix='prefix-', suffix='-suffix', dir=top): %s" % e )
99
107
0 commit comments