Merge pull request #5 from tiffanycmeyer13/v23

Remove pwd import so notebooks will run on Windows
This commit is contained in:
tiffanycmeyer13 2025-02-12 10:05:02 -06:00 committed by GitHub
commit 7d35776d1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 10 deletions

View file

@ -20,15 +20,11 @@
# File auto-generated against equivalent DynamicSerialize Java class # File auto-generated against equivalent DynamicSerialize Java class
import os, pwd import os
class UserId(object): class UserId(object):
def __init__(self, id = None): def __init__(self, id = None):
if id is None: self.id = id
self.id = pwd.getpwuid(os.getuid()).pw_name
else:
self.id = id
def getId(self): def getId(self):
return self.id return self.id

View file

@ -37,7 +37,6 @@
import struct import struct
import socket import socket
import os import os
import pwd
import threading import threading
class WsId(object): class WsId(object):
@ -48,8 +47,6 @@ class WsId(object):
self.networkId = str(struct.unpack('<L',socket.inet_aton(socket.gethostbyname(socket.gethostname())))[0]) self.networkId = str(struct.unpack('<L',socket.inet_aton(socket.gethostbyname(socket.gethostname())))[0])
self.userName = userName self.userName = userName
if userName is None:
self.userName = pwd.getpwuid(os.getuid()).pw_name
self.progName = progName self.progName = progName
if progName is None: if progName is None:
@ -102,4 +99,4 @@ class WsId(object):
return s return s
def __repr__(self): def __repr__(self):
return self.__str__() return self.__str__()