Mercurial > public > mercurial-scm > hg
comparison mercurial/utils/resourceutil.py @ 44924:6c8384afbf77 stable
resourceutil: fix location of line comments
These comments slipped out of position when the sources where formatted with
black in 2372284d9457.
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Tue, 09 Jun 2020 05:24:45 +0200 |
parents | aea79f41ee55 |
children | dd9e28612468 |
comparison
equal
deleted
inserted
replaced
44923:1f114c797961 | 44924:6c8384afbf77 |
---|---|
21 | 21 |
22 The code supports py2exe (most common, Windows only) and tools/freeze | 22 The code supports py2exe (most common, Windows only) and tools/freeze |
23 (portable, not much used). | 23 (portable, not much used). |
24 """ | 24 """ |
25 return ( | 25 return ( |
26 pycompat.safehasattr(sys, "frozen") | 26 pycompat.safehasattr(sys, "frozen") # new py2exe |
27 or pycompat.safehasattr(sys, "importers") # new py2exe | 27 or pycompat.safehasattr(sys, "importers") # old py2exe |
28 or imp.is_frozen("__main__") # old py2exe | 28 or imp.is_frozen("__main__") # tools/freeze |
29 ) # tools/freeze | 29 ) |
30 | 30 |
31 | 31 |
32 # the location of data files matching the source code | 32 # the location of data files matching the source code |
33 if mainfrozen() and getattr(sys, "frozen", None) != "macosx_app": | 33 if mainfrozen() and getattr(sys, "frozen", None) != "macosx_app": |
34 # executable version (py2exe) doesn't support __file__ | 34 # executable version (py2exe) doesn't support __file__ |