DIRACGrid/DIRAC — Issue #533: StorageElement unsafe ?
Author: ubeda
Created: 2012-02-21 15:54:49+00:00
State: open

Hi,

a problem while testing on certification lead the execution here to a point where
```
StorageFactory().getStorages()
```
in the init method was returning S_ERROR, therefore, class members like localProtocols
are not created. This makes other class methods, like getProtocols launch an exception.

```
def __init__( self, name, protocols = None, overwride = False ):
...
if not res['OK']:
self.valid = False
self.name = name
self.errorReason = res['Message']
else:
factoryDict = res['Value']
self.name = factoryDict['StorageName']
self.options = factoryDict['StorageOptions']
self.localProtocols = factoryDict['LocalProtocols']
self.remoteProtocols = factoryDict['RemoteProtocols']
self.storages = factoryDict['StorageObjects']
self.protocolOptions = factoryDict['ProtocolOptions']
self.turlProtocols = factoryDict['TurlProtocols']

```