DIRACGrid/DIRAC — pull request #2209 by andresailer (2014-12-16 11:54:58+00:00)
Title: [v6r11] JobScheduling: Protect against missing attribute RescheduleCounter

Encountered this exception, probably because the job in question was deleted while in optimzation.
```
2014-12-11 14:14:07 UTC WorkloadManagement/JobScheduling INFO: [JID 11745789] Processing
2014-12-11 14:14:07 UTC WorkloadManagement/JobScheduling EXCEPT: Error while processing task 11745789
2014-12-11 14:14:07 UTC WorkloadManagement/JobScheduling EXCEPT: == EXCEPTION ==
2014-12-11 14:14:07 UTC WorkloadManagement/JobScheduling EXCEPT: :'RescheduleCounter'
2014-12-11 14:14:07 UTC WorkloadManagement/JobScheduling EXCEPT: File "/opt/dirac/pro/DIRAC/Core/Base/ExecutorReactor.py", line 164, in __moduleProcess
2014-12-11 14:14:07 UTC WorkloadManagement/JobScheduling EXCEPT: result = modInstance._ex_processTask( taskId, taskStub )
2014-12-11 14:14:07 UTC WorkloadManagement/JobScheduling EXCEPT:
2014-12-11 14:14:07 UTC WorkloadManagement/JobScheduling EXCEPT: File "/opt/dirac/pro/DIRAC/Core/Base/ExecutorModule.py", line 135, in _ex_processTask
2014-12-11 14:14:07 UTC WorkloadManagement/JobScheduling EXCEPT: result = self.processTask( taskId, taskObj )
2014-12-11 14:14:07 UTC WorkloadManagement/JobScheduling EXCEPT:
2014-12-11 14:14:07 UTC WorkloadManagement/JobScheduling EXCEPT: File "/opt/dirac/pro/DIRAC/WorkloadManagementSystem/Executor/Base/OptimizerExecutor.py", line 74, in processTask
2014-12-11 14:14:07 UTC WorkloadManagement/JobScheduling EXCEPT: optResult = self.optimizeJob( jid, jobState )
2014-12-11 14:14:07 UTC WorkloadManagement/JobScheduling EXCEPT:
2014-12-11 14:14:07 UTC WorkloadManagement/JobScheduling EXCEPT: File "/opt/dirac/pro/DIRAC/WorkloadManagementSystem/Executor/JobScheduling.py", line 62, in optimizeJob
2014-12-11 14:14:07 UTC WorkloadManagement/JobScheduling EXCEPT: reschedules = int( attDict[ 'RescheduleCounter' ] )
```
So added catching of KeyError exception.