mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 14:57:56 -05:00
Merge pull request #5 from tiffanycmeyer13/v23
Remove pwd import so notebooks will run on Windows
This commit is contained in:
commit
7d35776d1b
2 changed files with 3 additions and 10 deletions
|
@ -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
|
||||||
|
|
|
@ -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__()
|
||||||
|
|
Loading…
Add table
Reference in a new issue