Show More
@@ -358,8 +358,8 b' def mainfrozen():' | |||
|
358 | 358 | The code supports py2exe (most common, Windows only) and tools/freeze |
|
359 | 359 | (portable, not much used). |
|
360 | 360 | """ |
|
361 | return (hasattr(sys, "frozen") or # new py2exe | |
|
362 | hasattr(sys, "importers") or # old py2exe | |
|
361 | return (safehasattr(sys, "frozen") or # new py2exe | |
|
362 | safehasattr(sys, "importers") or # old py2exe | |
|
363 | 363 | imp.is_frozen("__main__")) # tools/freeze |
|
364 | 364 | |
|
365 | 365 | def hgexecutable(): |
@@ -783,7 +783,7 b' class atomictempfile(object):' | |||
|
783 | 783 | self._fp.close() |
|
784 | 784 | |
|
785 | 785 | def __del__(self): |
|
786 | if hasattr(self, '_fp'): # constructor actually did something | |
|
786 | if safehasattr(self, '_fp'): # constructor actually did something | |
|
787 | 787 | self.close() |
|
788 | 788 | |
|
789 | 789 | def makedirs(name, mode=None): |
@@ -1254,8 +1254,9 b' def rundetached(args, condfn):' | |||
|
1254 | 1254 | def handler(signum, frame): |
|
1255 | 1255 | terminated.add(os.wait()) |
|
1256 | 1256 | prevhandler = None |
|
1257 |
|
|
|
1258 | prevhandler = signal.signal(signal.SIGCHLD, handler) | |
|
1257 | SIGCHLD = getattr(signal, 'SIGCHLD', None) | |
|
1258 | if SIGCHLD is not None: | |
|
1259 | prevhandler = signal.signal(SIGCHLD, handler) | |
|
1259 | 1260 | try: |
|
1260 | 1261 | pid = spawndetached(args) |
|
1261 | 1262 | while not condfn(): |
General Comments 0
You need to be logged in to leave comments.
Login now