incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1229893 - in /incubator/tashi/branches/stroucki-accounting/src/tashi: ./ accounting/ agents/ clustermanager/ clustermanager/data/ nodemanager/ nodemanager/vmcontrol/ rpycservices/
Date Wed, 11 Jan 2012 04:38:04 GMT
Author: stroucki
Date: Wed Jan 11 04:38:03 2012
New Revision: 1229893

URL: http://svn.apache.org/viewvc?rev=1229893&view=rev
Log:
process code with pyflakes

Modified:
    incubator/tashi/branches/stroucki-accounting/src/tashi/accounting/accounting.py
    incubator/tashi/branches/stroucki-accounting/src/tashi/accounting/accountingservice.py
    incubator/tashi/branches/stroucki-accounting/src/tashi/agents/primitive.py
    incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/clustermanager.py
    incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/clustermanagerservice.py
    incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/data/fromconfig.py
    incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/data/pickled.py
    incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/data/sql.py
    incubator/tashi/branches/stroucki-accounting/src/tashi/connectionmanager.py
    incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/nodemanager.py
    incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/nodemanagerservice.py
    incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/vmcontrol/qemu.py
    incubator/tashi/branches/stroucki-accounting/src/tashi/parallel.py
    incubator/tashi/branches/stroucki-accounting/src/tashi/rpycservices/rpycservices.py
    incubator/tashi/branches/stroucki-accounting/src/tashi/util.py

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/accounting/accounting.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/accounting/accounting.py?rev=1229893&r1=1229892&r2=1229893&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/accounting/accounting.py (original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/accounting/accounting.py Wed Jan
11 04:38:03 2012
@@ -17,21 +17,15 @@
 # specific language governing permissions and limitations
 # under the License.    
 
-from socket import gethostname
-import os
-import socket
 import sys
-import threading
 import signal
-import time
-import random
 import logging.config
 
 from tashi.rpycservices import rpycservices
 from rpyc.utils.server import ThreadedServer
-from rpyc.utils.authenticators import TlsliteVdbAuthenticator
+#from rpyc.utils.authenticators import TlsliteVdbAuthenticator
 
-from tashi.rpycservices.rpyctypes import *
+#from tashi.rpycservices.rpyctypes import *
 from tashi.util import getConfig, createClient, instantiateImplementation, boolean, debugConsole,
signalHandler
 import tashi
 
@@ -56,17 +50,9 @@ class Accounting(object):
 	def initAccountingServer(self):
 		service = instantiateImplementation(self.config.get("Accounting", "service"), self.config)
 
-		if boolean(self.config.get("Security", "authAndEncrypt")):
-			users = {}
-			userDatabase = data.getUsers()
-			for user in userDatabase.values():
-				if user.passwd != None:
-					users[user.name] = user.passwd
-			users[self.config.get('AllowedUsers', 'clusterManagerUser')] = self.config.get('AllowedUsers',
'clusterManagerPassword')
-			users[self.config.get('AllowedUsers', 'nodeManagerUser')] = self.config.get('AllowedUsers',
'nodeManagerPassword')
-			users[self.config.get('AllowedUsers', 'agentUser')] = self.config.get('AllowedUsers',
'agentPassword')
-			authenticator = TlsliteVdbAuthenticator.from_dict(users)
-			t = ThreadedServer(service=rpycservices.ManagerService, hostname='0.0.0.0', port=int(self.config.get('AccountingService',
'port')), auto_register=False, authenticator=authenticator)
+		#if boolean(self.config.get("Security", "authAndEncrypt")):
+		if False:
+			pass
 		else:
 			t = ThreadedServer(service=rpycservices.ManagerService, hostname='0.0.0.0', port=int(self.config.get('AccountingService',
'port')), auto_register=False)
 
@@ -79,13 +65,11 @@ class Accounting(object):
 		try:
 			t.start()
 		except KeyboardInterrupt:
-			handleSIGTERM(signal.SIGTERM, None)
+			self.handleSIGTERM(signal.SIGTERM, None)
 
 	@signalHandler(signal.SIGTERM)
-	def handleSIGTERM(signalNumber, stackFrame):
-		global log
-		
-		log.info('Exiting cluster manager after receiving a SIGINT signal')
+	def handleSIGTERM(self, signalNumber, stackFrame):
+		self.log.info('Exiting cluster manager after receiving a SIGINT signal')
 		sys.exit(0)
 
 def main():

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/accounting/accountingservice.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/accounting/accountingservice.py?rev=1229893&r1=1229892&r2=1229893&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/accounting/accountingservice.py
(original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/accounting/accountingservice.py
Wed Jan 11 04:38:03 2012
@@ -15,15 +15,11 @@
 # specific language governing permissions and limitations
 # under the License.    
 
-from datetime import datetime
-from random import randint
-from socket import gethostname
 import logging
 import threading
 import time
 
-from tashi.rpycservices.rpyctypes import Errors, InstanceState, HostState, TashiException
-from tashi import boolean, convertExceptions, ConnectionManager, vmStates, timed, version,
scrubString, createClient
+from tashi import createClient
 
 class AccountingService(object):
         """RPC service for the Accounting service"""

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/agents/primitive.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/agents/primitive.py?rev=1229893&r1=1229892&r2=1229893&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/agents/primitive.py (original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/agents/primitive.py Wed Jan 11
04:38:03 2012
@@ -17,16 +17,11 @@
 # specific language governing permissions and limitations
 # under the License.    
 
-from socket import gethostname
-import os
-import socket
-import sys
-import threading
 import time
-import random
 import logging.config
 
-from tashi.rpycservices.rpyctypes import *
+from tashi.rpycservices.rpyctypes import Errors, HostState, InstanceState, TashiException
+
 from tashi.util import getConfig, createClient, instantiateImplementation, boolean
 import tashi
 
@@ -274,10 +269,10 @@ class Primitive(object):
 					# end for unassigned vms
 
 
-			except TashiException, e:
+			except TashiException:
 				self.log.exception("Tashi exception")
 
-			except Exception, e:
+			except Exception:
 				self.log.warning("Scheduler iteration failed")
 
 

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/clustermanager.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/clustermanager.py?rev=1229893&r1=1229892&r2=1229893&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/clustermanager.py
(original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/clustermanager.py
Wed Jan 11 04:38:03 2012
@@ -17,13 +17,9 @@
 # specific language governing permissions and limitations
 # under the License.    
 
-import os
 import sys
-import threading
 import signal
 import logging.config
-from getopt import getopt, GetoptError
-from ConfigParser import ConfigParser
 
 from tashi.util import signalHandler, boolean, instantiateImplementation, getConfig, debugConsole
 import tashi

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/clustermanagerservice.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/clustermanagerservice.py?rev=1229893&r1=1229892&r2=1229893&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/clustermanagerservice.py
(original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/clustermanagerservice.py
Wed Jan 11 04:38:03 2012
@@ -15,16 +15,13 @@
 # specific language governing permissions and limitations
 # under the License.    
 
-from datetime import datetime
-from random import randint
-from socket import gethostname
 import logging
 import threading
 import time
 
 from tashi.rpycservices import rpycservices             
 from tashi.rpycservices.rpyctypes import Errors, InstanceState, HostState, TashiException
-from tashi import boolean, convertExceptions, ConnectionManager, vmStates, timed, version,
scrubString
+from tashi import boolean, ConnectionManager, vmStates, version, scrubString
 
 class ClusterManagerService(object):
 	"""RPC service for the ClusterManager"""
@@ -424,7 +421,7 @@ class ClusterManagerService(object):
 			self.proxy[sourceHost.name].prepSourceVm(instance.vmId)
 			self.log.info("migrateVm: Calling prepReceiveVm on target host %s" % targetHost.name)
 			cookie = self.proxy[targetHost.name].prepReceiveVm(instance, sourceHost)
-		except Exception, e:
+		except Exception:
 			self.log.exception('prepReceiveVm failed')
 			raise
 		instance = self.data.acquireInstance(instance.id)
@@ -433,7 +430,7 @@ class ClusterManagerService(object):
 		try:
 			# Send the VM
 			self.proxy[sourceHost.name].migrateVm(instance.vmId, targetHost, cookie)
-		except Exception, e:
+		except Exception:
 			self.log.exception('migrateVm failed')
 			raise
 		try:
@@ -445,7 +442,7 @@ class ClusterManagerService(object):
 		try:
 			# Notify the target
 			vmId = self.proxy[targetHost.name].receiveVm(instance, cookie)
-		except Exception, e:
+		except Exception:
 			self.log.exception('receiveVm failed')
 			raise
 		return
@@ -641,7 +638,7 @@ class ClusterManagerService(object):
 				vmId = self.proxy[host.name].resumeVm(instance, instance.hints['__resume_source'])
 			else:
 				vmId = self.proxy[host.name].instantiateVm(instance)
-		except Exception, e:
+		except Exception:
 			instance = self.data.acquireInstance(instanceId)
 			if (instance.state is InstanceState.Destroying): # Special case for if destroyVm is called
during initialization and initialization fails
 				self.data.removeInstance(instance)

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/data/fromconfig.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/data/fromconfig.py?rev=1229893&r1=1229892&r2=1229893&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/data/fromconfig.py
(original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/data/fromconfig.py
Wed Jan 11 04:38:03 2012
@@ -20,7 +20,7 @@ import threading
 import os
 import ConfigParser
 
-from tashi.rpycservices.rpyctypes import *
+from tashi.rpycservices.rpyctypes import Host, Network, User, TashiException, Errors, HostState
 from tashi.clustermanager.data import DataInterface
 
 class FromConfig(DataInterface):
@@ -109,7 +109,7 @@ class FromConfig(DataInterface):
 	def releaseInstance(self, instance):
 		try:
 			if (instance.id not in self.instances): # MPR: should never be true, but good to check
-				raise TashiException(d={'errno':Errors.NoSuchInstanceId,'msg':"No such instanceId - %d"
% (instanceId)})
+				raise TashiException(d={'errno':Errors.NoSuchInstanceId,'msg':"No such instanceId - %d"
% (instance.id)})
 		finally:
 			self.releaseLock(instance._lock)
 	

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/data/pickled.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/data/pickled.py?rev=1229893&r1=1229892&r2=1229893&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/data/pickled.py
(original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/data/pickled.py
Wed Jan 11 04:38:03 2012
@@ -18,7 +18,7 @@
 import cPickle
 import os
 import threading
-from tashi.rpycservices.rpyctypes import *
+from tashi.rpycservices.rpyctypes import Instance, Host
 from tashi.clustermanager.data import FromConfig, DataInterface
 
 class Pickled(FromConfig):

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/data/sql.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/data/sql.py?rev=1229893&r1=1229892&r2=1229893&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/data/sql.py (original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/clustermanager/data/sql.py Wed
Jan 11 04:38:03 2012
@@ -17,11 +17,9 @@
 
 import logging
 import threading
-import time
-import types
 # XXXstroucki getImages needs os?
 import os
-from tashi.rpycservices.rpyctypes import *
+from tashi.rpycservices.rpyctypes import Errors, Network, Host, User, Instance, TashiException,
LocalImages, DiskConfiguration, NetworkConfiguration, ValueException
 from tashi.clustermanager.data.datainterface import DataInterface
 from tashi.util import stringPartition, boolean, instantiateImplementation, humanReadable
 

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/connectionmanager.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/connectionmanager.py?rev=1229893&r1=1229892&r2=1229893&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/connectionmanager.py (original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/connectionmanager.py Wed Jan 11
04:38:03 2012
@@ -15,9 +15,8 @@
 # specific language governing permissions and limitations
 # under the License.    
 
-import rpyc
 from tashi.rpycservices import rpycservices
-from tashi.rpycservices.rpyctypes import *
+#from tashi.rpycservices.rpyctypes import *
 
 class ConnectionManager(object):
 	def __init__(self, username, password, port, timeout=10000.0):

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/nodemanager.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/nodemanager.py?rev=1229893&r1=1229892&r2=1229893&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/nodemanager.py (original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/nodemanager.py Wed
Jan 11 04:38:03 2012
@@ -22,7 +22,6 @@ import signal
 import sys
 
 from tashi.util import instantiateImplementation, getConfig, debugConsole, signalHandler
-from tashi import ConnectionManager
 import tashi
 from tashi import boolean
 

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/nodemanagerservice.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/nodemanagerservice.py?rev=1229893&r1=1229892&r2=1229893&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/nodemanagerservice.py
(original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/nodemanagerservice.py
Wed Jan 11 04:38:03 2012
@@ -15,18 +15,14 @@
 # specific language governing permissions and limitations
 # under the License.    
 
-import cPickle
 import logging
-import os
 import socket
-import sys
 import threading
 import time
 
 from tashi.rpycservices import rpycservices
-from tashi.rpycservices.rpyctypes import Host, HostState, InstanceState, TashiException,
Errors, Instance
-from tashi.nodemanager import RPC
-from tashi import boolean, vmStates, logged, ConnectionManager, timed
+from tashi.rpycservices.rpyctypes import InstanceState, TashiException, Errors, Instance
+from tashi import boolean, vmStates, ConnectionManager
 import tashi
 
 
@@ -103,7 +99,7 @@ class NodeManagerService(object):
 	def __loadVmInfo(self):
 		try:
 			self.instances = self.vmm.getInstances()
-		except Exception, e:
+		except Exception:
 			self.log.exception('Failed to obtain VM info')
 			self.instances = {}
 
@@ -187,7 +183,7 @@ class NodeManagerService(object):
 			try:
 				instances = self.instances.values()
 				self.id = self.cm.registerNodeManager(self.host, instances)
-			except Exception, e:
+			except Exception:
 				self.log.exception('Failed to register with the CM')
 
 			toSleep = start - time.time() + self.registerFrequency

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/vmcontrol/qemu.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/vmcontrol/qemu.py?rev=1229893&r1=1229892&r2=1229893&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/vmcontrol/qemu.py (original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/nodemanager/vmcontrol/qemu.py Wed
Jan 11 04:38:03 2012
@@ -27,11 +27,9 @@ import subprocess
 import sys
 import time
 
-# for scratch space support
-from os import system
-
-from tashi.rpycservices.rpyctypes import *
-from tashi.util import broken, logged, scrubString, boolean
+#from tashi.rpycservices.rpyctypes import *
+from tashi.rpycservices.rpyctypes import InstanceState, Host
+from tashi.util import scrubString, boolean
 from tashi import version, stringPartition
 from vmcontrolinterface import VmControlInterface
 
@@ -47,7 +45,7 @@ def controlConsole(child, port):
 		try:
 			listenSocket.listen(5)
 			ls = listenSocket.fileno()
-			input = child.monitorFd
+			#input = child.monitorFd
 			output = child.monitorFd
 			#print "listen"
 			select.select([ls], [], [])
@@ -214,8 +212,8 @@ class Qemu(VmControlInterface):
 				try:
 					if (not child.migratingOut):
 						self.nm.vmStateChange(vmId, None, InstanceState.Exited)
-				except Exception, e:
-					log.exception("vmStateChange failed forVM %s" % (name))
+				except Exception:
+					log.exception("vmStateChange failed for VM %s" % (name))
 			else:
 				# VM is still running
 				try:
@@ -248,7 +246,7 @@ class Qemu(VmControlInterface):
 				child.instance.vmId = vmId
 				
 				self.controlledVMs[vmId] = child
-			except Exception, e:
+			except Exception:
 				log.exception("Failed to load VM info for %d", vmId)
 			else:
 				log.info("Loaded VM info for %d", vmId)
@@ -637,7 +635,7 @@ class Qemu(VmControlInterface):
 		child = self.__getChildFromPid(instance.vmId)
 		try:
 			self.__getPtyInfo(child, True)
-		except RuntimeError, e:
+		except RuntimeError:
 			log.error("Failed to get pty info -- VM likely died")
 			child.errorBit = True
 			raise
@@ -717,7 +715,7 @@ class Qemu(VmControlInterface):
 			raise
 		try:
 			self.__getPtyInfo(child, True)
-		except RuntimeError, e:
+		except RuntimeError:
 			log.error("Failed to get pty info -- VM likely died")
 			child.errorBit = True
 			raise

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/parallel.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/parallel.py?rev=1229893&r1=1229892&r2=1229893&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/parallel.py (original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/parallel.py Wed Jan 11 04:38:03
2012
@@ -116,8 +116,8 @@ def synchronizedmethod(func):
 # Test Code
 ##############################
 import unittest
-import sys
-import time
+#import sys
+#import time
 
 class TestThreadPool(unittest.TestCase):
 	def setUp(self):

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/rpycservices/rpycservices.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/rpycservices/rpycservices.py?rev=1229893&r1=1229892&r2=1229893&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/rpycservices/rpycservices.py (original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/rpycservices/rpycservices.py Wed
Jan 11 04:38:03 2012
@@ -16,7 +16,7 @@
 # under the License.
 
 import rpyc
-from tashi.rpycservices.rpyctypes import *
+from tashi.rpycservices.rpyctypes import Instance, Host, User
 import cPickle
 
 clusterManagerRPCs = ['createVm', 'shutdownVm', 'destroyVm', 'suspendVm', 'resumeVm', 'migrateVm',
'pauseVm', 'unpauseVm', 'getHosts', 'getNetworks', 'getUsers', 'getInstances', 'vmmSpecificCall',
'registerNodeManager', 'vmUpdate', 'activateVm', 'registerHost', 'getImages', 'copyImage']

Modified: incubator/tashi/branches/stroucki-accounting/src/tashi/util.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-accounting/src/tashi/util.py?rev=1229893&r1=1229892&r2=1229893&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-accounting/src/tashi/util.py (original)
+++ incubator/tashi/branches/stroucki-accounting/src/tashi/util.py Wed Jan 11 04:38:03 2012
@@ -16,11 +16,11 @@
 # under the License.    
 
 import ConfigParser
-import cPickle
+#import cPickle
 import os
-import select
+#import select
 import signal
-import struct
+#import struct
 import sys
 import threading
 import time
@@ -28,7 +28,6 @@ import traceback
 import types
 import getpass
 
-import rpyc
 from tashi.rpycservices import rpycservices
 from tashi.rpycservices.rpyctypes import TashiException, Errors, InstanceState, HostState
 
@@ -109,7 +108,7 @@ class failsafe(object):
 		def newFunc(*args, **kw):
 			try:
 				return cur(*args, **kw)
-			except Exception, e:
+			except:
 				self.__dict__['__current_obj__'] = self.__dict__['__failsafe_obj__']
 				return fail(*args, **kw)
 		return newFunc
@@ -182,6 +181,7 @@ def boolean(value):
 def instantiateImplementation(className, *args):
 	"""Create an instance of an object with the given class name and list 
 	   of args to __init__"""
+	obj = None
 	if (className.rfind(".") != -1):
 		package = className[:className.rfind(".")]
 		cmd = "import %s\n" % (package)
@@ -197,9 +197,9 @@ def convertExceptions(oldFunc):
 	def newFunc(*args, **kw):
 		try:
 			return oldFunc(*args, **kw)
-		except TashiException, e:
+		except TashiException:
 			raise
-		except Exception, e:
+		except:
 			self = args[0]
 			if (self.convertExceptions):
 				raise TashiException(d={'errno':Errors.ConvertedException, 'msg': traceback.format_exc(10)})
@@ -264,10 +264,12 @@ def scrubString(s, allowed="ABCDEFGHIJKL
 def createClient(config):
 	cfgHost = config.get('Client', 'clusterManagerHost')
 	cfgPort = config.get('Client', 'clusterManagerPort')
-	cfgTimeout = config.get('Client', 'clusterManagerTimeout')
+	#XXXstroucki nothing uses timeout right now
+	#cfgTimeout = config.get('Client', 'clusterManagerTimeout')
 	host = os.getenv('TASHI_CM_HOST', cfgHost)
 	port = os.getenv('TASHI_CM_PORT', cfgPort)
-	timeout = float(os.getenv('TASHI_CM_TIMEOUT', cfgTimeout)) * 1000.0
+	#XXXstroucki nothing uses timeout right now
+	#timeout = float(os.getenv('TASHI_CM_TIMEOUT', cfgTimeout)) * 1000.0
 
 	authAndEncrypt = boolean(config.get('Security', 'authAndEncrypt'))
 	if authAndEncrypt:



Mime
View raw message