~madteam/mg5amcnlo/series2.0

« back to all changes in this revision

Viewing changes to madgraph/core/base_objects.py

  • Committer: Rikkert Frederix
  • Date: 2014-09-10 16:17:48 UTC
  • mfrom: (253.17.27 2.2.0)
  • mto: (253.17.29 2.2.0)
  • mto: This revision was merged to the branch mainline in revision 255.
  • Revision ID: frederix@physik.uzh.ch-20140910161748-lh37vqyin7eh22y3
merge with latest 2.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
484
484
        part = self.find_name(name)
485
485
        if not part:
486
486
            # Then try to look for a particle with that PDG
487
 
            if name.isdigit():
 
487
            try:
488
488
                pdg = int(name)
489
 
            else:
 
489
            except ValueError:
490
490
                return None
491
491
 
492
492
            for p in self: