Show More
@@ -15,6 +15,7 b' import time' | |||
|
15 | 15 | import warnings |
|
16 | 16 | |
|
17 | 17 | from . import ( |
|
18 | encoding, | |
|
18 | 19 | error, |
|
19 | 20 | pycompat, |
|
20 | 21 | util, |
@@ -27,7 +28,8 b' def _getlockprefix():' | |||
|
27 | 28 | confidence. Typically it's just hostname. On modern linux, we include an |
|
28 | 29 | extra Linux-specific pid namespace identifier. |
|
29 | 30 | """ |
|
30 | result = socket.gethostname() | |
|
31 | result = socket.gethostname().encode( | |
|
32 | pycompat.sysstr(encoding.encoding), 'replace') | |
|
31 | 33 | if pycompat.sysplatform.startswith('linux'): |
|
32 | 34 | try: |
|
33 | 35 | result += '/%x' % os.stat('/proc/self/ns/pid').st_ino |
General Comments 0
You need to be logged in to leave comments.
Login now