comparison contrib/hgclient.py @ 48946:642e31cb55f0

py3: use class X: instead of class X(object): The inheritance from object is implied in Python 3. So this should be equivalent. This change was generated via an automated search and replace. So there may have been some accidental changes. Differential Revision: https://phab.mercurial-scm.org/D12352
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 21 Feb 2022 13:08:28 -0700
parents 6000f5b25c9b
children 493034cc3265
comparison
equal deleted inserted replaced
48945:55d132525155 48946:642e31cb55f0
47 ) 47 )
48 48
49 return server 49 return server
50 50
51 51
52 class unixconnection(object): 52 class unixconnection:
53 def __init__(self, sockpath): 53 def __init__(self, sockpath):
54 self.sock = sock = socket.socket(socket.AF_UNIX) 54 self.sock = sock = socket.socket(socket.AF_UNIX)
55 sock.connect(sockpath) 55 sock.connect(sockpath)
56 self.stdin = sock.makefile('wb') 56 self.stdin = sock.makefile('wb')
57 self.stdout = sock.makefile('rb') 57 self.stdout = sock.makefile('rb')
60 self.stdin.close() 60 self.stdin.close()
61 self.stdout.close() 61 self.stdout.close()
62 self.sock.close() 62 self.sock.close()
63 63
64 64
65 class unixserver(object): 65 class unixserver:
66 def __init__(self, sockpath, logpath=None, repopath=None): 66 def __init__(self, sockpath, logpath=None, repopath=None):
67 self.sockpath = sockpath 67 self.sockpath = sockpath
68 cmdline = [b'hg', b'serve', b'--cmdserver', b'unix', b'-a', sockpath] 68 cmdline = [b'hg', b'serve', b'--cmdserver', b'unix', b'-a', sockpath]
69 if repopath: 69 if repopath:
70 cmdline += [b'-R', repopath] 70 cmdline += [b'-R', repopath]