Commit 6560c3a0 authored by 's avatar

Fixed the licensing code to not call get_transaction().commit() during the

initial request that creates a new bobobase.
parent 277a9722
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
__doc__='''Application support __doc__='''Application support
$Id: Application.py,v 1.49 1998/02/12 23:03:29 brian Exp $''' $Id: Application.py,v 1.50 1998/02/14 21:24:31 brian Exp $'''
__version__='$Revision: 1.49 $'[11:-2] __version__='$Revision: 1.50 $'[11:-2]
import Globals,Folder,os,regex,sys import Globals,Folder,os,regex,sys
...@@ -295,8 +295,7 @@ def lic_check(product_name): ...@@ -295,8 +295,7 @@ def lic_check(product_name):
product_dir=path_join(SOFTWARE_HOME,'lib/python/Products') product_dir=path_join(SOFTWARE_HOME,'lib/python/Products')
package_dir=path_join(product_dir, product_name) package_dir=path_join(product_dir, product_name)
bobobase =Globals.Bobobase bobobase =Globals.Bobobase
if bobobase is None: safe=bobobase.has_key('Application')
return 1
try: f=open(path_join(package_dir,'%s.lic' % product_name), 'rb') try: f=open(path_join(package_dir,'%s.lic' % product_name), 'rb')
except: except:
try: try:
...@@ -329,12 +328,12 @@ def lic_check(product_name): ...@@ -329,12 +328,12 @@ def lic_check(product_name):
else: else:
if not bobobase.has_key('_t_'): if not bobobase.has_key('_t_'):
bobobase['_t_']={} bobobase['_t_']={}
get_transaction().commit() if safe: get_transaction().commit()
t=bobobase['_t_'] t=bobobase['_t_']
if not t.has_key(product_name): if not t.has_key(product_name):
t[product_name]=time.time() t[product_name]=time.time()
bobobase['_t_']=t bobobase['_t_']=t
get_transaction().commit() if safe: get_transaction().commit()
if (t[product_name] + (86400.0 * val)) < time.time(): if (t[product_name] + (86400.0 * val)) < time.time():
product=getattr(__import__("Products.%s" % product_name), product=getattr(__import__("Products.%s" % product_name),
product_name) product_name)
...@@ -378,6 +377,10 @@ class Misc_: ...@@ -378,6 +377,10 @@ class Misc_:
############################################################################## ##############################################################################
# #
# $Log: Application.py,v $ # $Log: Application.py,v $
# Revision 1.50 1998/02/14 21:24:31 brian
# Fixed the licensing code to not call get_transaction().commit() during the
# initial request that creates a new bobobase.
#
# Revision 1.49 1998/02/12 23:03:29 brian # Revision 1.49 1998/02/12 23:03:29 brian
# *** empty log message *** # *** empty log message ***
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment