avuserow / endgame-singularity

(unofficial) Automatically exported from code.google.com/p/endgame-singularity
http://www.emhsoft.com/singularity/
0 stars 0 forks source link

Exception thrown in finance report #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When you open a finance report, you should be presented with your cpu and 
fund usage for the next day.  In some instances, an exception is thrown 
(and caught, but it prevents you from getting a look at your situation.)  

What steps will reproduce the problem?
1. Start construction of a base that requires CPU power (e.g. Stolen 
computer time);.
2. Disable all dedicated tasks (including CPUs reserved for pool or jobs). 
3. Check the finance screen. 

Crash occurs here:
        # Base construction.
        for base in bases_under_construction:
            if dry_run:
                spent = base.calculate_work(time=mins_passed,
                                            cpu_available=real_cpu )[0]

To fix, replace real_cpu with the current CPUs that can be used (e.g. 
self.cpu_pool or g.pl.cpu_pool). 

Original issue reported on code.google.com by raymond....@gmail.com on 26 Apr 2009 at 9:47

GoogleCodeExporter commented 9 years ago
Fixed in r943.  Thanks.

Original comment by phil.bor...@gmail.com on 23 May 2009 at 3:33