Bug #1469

Constructor of some cscripts breaks from python if no argument is given

Added by Mayer Michael almost 9 years ago. Updated almost 9 years ago.

Status:ClosedStart date:06/01/2015
Priority:ImmediateDue date:
Assigned To:Mayer Michael% Done:

100%

Category:-
Target version:1.0.0
Duration:

Description

When running a cscript from within python, e.g.
import csresmap
resmap = csresmap.csresmap()

The above code will throw an error due to the following line of code int the cscripts:
if isinstance(argv[0],gammalib.GObservations):
            self.obs = argv[0]
            argv     = argv[1:]

It has to be assured that len(argv)>0 first! the following cscripts are affected:
  • csresmap
  • csspec
  • cslightcrv

Recurrence

No recurrence.

History

#1 Updated by Mayer Michael almost 9 years ago

  • Status changed from New to Pull request
  • % Done changed from 0 to 100

fix available on 1469-fix-cscript-python-constructor

#2 Updated by Knödlseder Jürgen almost 9 years ago

  • Status changed from Pull request to Closed
  • Target version set to 1.0.0

Merged into devel.

Also available in: Atom PDF