more manual fixes

This commit is contained in:
mjames-upc 2018-09-06 19:27:58 -06:00
parent 7a2dca5d37
commit fc2c5cb930
5 changed files with 29 additions and 7 deletions

View file

@ -67,7 +67,7 @@ def determineDrtOffset(timeStr):
# i.e. "truncate" cur_t to most recent hour.
if synch:
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')
launchStr = timeStr + "," + curStr

View file

@ -34,19 +34,32 @@
# 01/09/2017 #5997 nabowle Allow contribution from plugins.
#
__all__ = [
'PointAdapter',
'StackTraceElementAdapter',
'WsIdAdapter',
'CalendarAdapter',
'GregorianCalendarAdapter',
'ActiveTableModeAdapter',
'DateAdapter',
'FormattedDateAdapter',
'LocalizationLevelSerializationAdapter',
'LocalizationTypeSerializationAdapter',
'GeometryTypeAdapter',
'CoordAdapter',
'TimeRangeTypeAdapter',
'ParmIDAdapter',
'DatabaseIDAdapter',
'TimestampAdapter',
'CommutativeTimestampAdapter',
'EnumSetAdapter',
'FloatBufferAdapter',
'ByteBufferAdapter',
'JTSEnvelopeAdapter'
'TimeConstraintsAdapter',
'LockTableAdapter',
'JTSEnvelopeAdapter',
'JobProgressAdapter'
]
classAdapterRegistry = {}

View file

@ -3,13 +3,22 @@
# 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):
def __init__(self, id = 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:
self.id = id

View file

@ -44,5 +44,5 @@ class ServerResponse(object):
def __str__(self):
return self.message()
def __nonzero__(self):
return self.isOkay()
def __bool__(self):
return self.isOkay()

View file

@ -66,7 +66,7 @@ class TimeRange(object):
totalSecs = int(timeArg)
micros = int((timeArg - totalSecs) * MICROS_IN_SECOND)
return self.__convertSecsAndMicros(totalSecs, micros)
elif isinstance(timeArg, (int, int)):
elif isinstance(timeArg, int):
# seconds as integer
totalSecs = timeArg
return self.__convertSecsAndMicros(totalSecs, 0)