Remove pwd import so notebooks will run on Windows

When running the notebooks on windows, you get a ModuleNotFoundError: No module named 'pwd'

The code is attempting to import pwd, which is not a module available on Windows systems. The pwd module is specific to Unix-based systems (like Linux and macOS) for user and password management, so we removed it from the following files:

dynamicserialize/dstypes/com/raytheon/uf/common/message/WsId.py
dynamicserialize/dstypes/com/raytheon/uf/common/auth/user/UserId.py
This commit is contained in:
ucar-tmeyer 2025-02-12 09:02:11 -07:00
parent ee9fa613cf
commit c4432a94c0
2 changed files with 3 additions and 10 deletions

View file

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

View file

@ -37,7 +37,6 @@
import struct
import socket
import os
import pwd
import threading
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.userName = userName
if userName is None:
self.userName = pwd.getpwuid(os.getuid()).pw_name
self.progName = progName
if progName is None: