mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 14:57:56 -05:00
more manual fixes
This commit is contained in:
parent
7a2dca5d37
commit
fc2c5cb930
5 changed files with 29 additions and 7 deletions
|
@ -67,7 +67,7 @@ def determineDrtOffset(timeStr):
|
||||||
# i.e. "truncate" cur_t to most recent hour.
|
# i.e. "truncate" cur_t to most recent hour.
|
||||||
if synch:
|
if synch:
|
||||||
cur_t = time.mktime((gm[0], gm[1], gm[2], gm[3], 0, 0, 0, 0, 0))
|
cur_t = time.mktime((gm[0], gm[1], gm[2], gm[3], 0, 0, 0, 0, 0))
|
||||||
curStr = '%4s%2s%2s_%2s00\n' % (gm[0],gm[1],gm[2],gm[3])
|
curStr = '%4s%2s%2s_%2s00\n' % (repr(gm[0]),repr(gm[1]),repr(gm[2]),repr(gm[3]))
|
||||||
curStr = curStr.replace(' ','0')
|
curStr = curStr.replace(' ','0')
|
||||||
launchStr = timeStr + "," + curStr
|
launchStr = timeStr + "," + curStr
|
||||||
|
|
||||||
|
|
|
@ -34,19 +34,32 @@
|
||||||
# 01/09/2017 #5997 nabowle Allow contribution from plugins.
|
# 01/09/2017 #5997 nabowle Allow contribution from plugins.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'PointAdapter',
|
'PointAdapter',
|
||||||
'StackTraceElementAdapter',
|
'StackTraceElementAdapter',
|
||||||
|
'WsIdAdapter',
|
||||||
'CalendarAdapter',
|
'CalendarAdapter',
|
||||||
'GregorianCalendarAdapter',
|
'GregorianCalendarAdapter',
|
||||||
|
'ActiveTableModeAdapter',
|
||||||
'DateAdapter',
|
'DateAdapter',
|
||||||
|
'FormattedDateAdapter',
|
||||||
|
'LocalizationLevelSerializationAdapter',
|
||||||
|
'LocalizationTypeSerializationAdapter',
|
||||||
'GeometryTypeAdapter',
|
'GeometryTypeAdapter',
|
||||||
'CoordAdapter',
|
'CoordAdapter',
|
||||||
|
'TimeRangeTypeAdapter',
|
||||||
|
'ParmIDAdapter',
|
||||||
|
'DatabaseIDAdapter',
|
||||||
'TimestampAdapter',
|
'TimestampAdapter',
|
||||||
|
'CommutativeTimestampAdapter',
|
||||||
'EnumSetAdapter',
|
'EnumSetAdapter',
|
||||||
'FloatBufferAdapter',
|
'FloatBufferAdapter',
|
||||||
'ByteBufferAdapter',
|
'ByteBufferAdapter',
|
||||||
'JTSEnvelopeAdapter'
|
'TimeConstraintsAdapter',
|
||||||
|
'LockTableAdapter',
|
||||||
|
'JTSEnvelopeAdapter',
|
||||||
|
'JobProgressAdapter'
|
||||||
]
|
]
|
||||||
|
|
||||||
classAdapterRegistry = {}
|
classAdapterRegistry = {}
|
||||||
|
|
|
@ -3,13 +3,22 @@
|
||||||
|
|
||||||
# File auto-generated against equivalent DynamicSerialize Java class
|
# File auto-generated against equivalent DynamicSerialize Java class
|
||||||
|
|
||||||
import os, pwd
|
import os
|
||||||
|
|
||||||
|
try:
|
||||||
|
import pwd
|
||||||
|
pwd_error = False
|
||||||
|
except ImportError:
|
||||||
|
pwd_error = True
|
||||||
|
|
||||||
class UserId(object):
|
class UserId(object):
|
||||||
|
|
||||||
def __init__(self, id = None):
|
def __init__(self, id = None):
|
||||||
if id is None:
|
if id is None:
|
||||||
self.id = pwd.getpwuid(os.getuid()).pw_name
|
if not pwd_error:
|
||||||
|
self.id = pwd.getpwuid(os.getuid()).pw_name
|
||||||
|
else:
|
||||||
|
self.id = "GenericUsername"
|
||||||
else:
|
else:
|
||||||
self.id = id
|
self.id = id
|
||||||
|
|
||||||
|
|
|
@ -44,5 +44,5 @@ class ServerResponse(object):
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.message()
|
return self.message()
|
||||||
|
|
||||||
def __nonzero__(self):
|
def __bool__(self):
|
||||||
return self.isOkay()
|
return self.isOkay()
|
||||||
|
|
|
@ -66,7 +66,7 @@ class TimeRange(object):
|
||||||
totalSecs = int(timeArg)
|
totalSecs = int(timeArg)
|
||||||
micros = int((timeArg - totalSecs) * MICROS_IN_SECOND)
|
micros = int((timeArg - totalSecs) * MICROS_IN_SECOND)
|
||||||
return self.__convertSecsAndMicros(totalSecs, micros)
|
return self.__convertSecsAndMicros(totalSecs, micros)
|
||||||
elif isinstance(timeArg, (int, int)):
|
elif isinstance(timeArg, int):
|
||||||
# seconds as integer
|
# seconds as integer
|
||||||
totalSecs = timeArg
|
totalSecs = timeArg
|
||||||
return self.__convertSecsAndMicros(totalSecs, 0)
|
return self.__convertSecsAndMicros(totalSecs, 0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue