SCIENTIFIC-LINUX-DEVEL Archives

September 2019

SCIENTIFIC-LINUX-DEVEL@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Pat Riehecky <[log in to unmask]>
Reply To:
Pat Riehecky <[log in to unmask]>
Date:
Tue, 10 Sep 2019 15:15:34 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (46 lines)
On 9/10/19 3:05 PM, Kraus, Dave (GE Healthcare) wrote:
> So, as it happens, we're spinning a 7.7. As I tried an initial lorax run to build the installation environment, I ran into a lorax python script error:
>
> Traceback (most recent call last):
>    File "/usr/sbin/lorax", line 428, in <module>
>      main(sys.argv)
>    File "/usr/sbin/lorax", line 164, in main
>      optional.add_argument("-e", "--excludepkgs", default=[],
> AttributeError: OptionGroup instance has no attribute 'add_argument'
> 0: ERROR: lorax failed. Exiting.
>
> The code snippet is as follows:
>
> ...
>      optional.add_option("-e", "--excludepkgs", default=[],
>              action="append", metavar="STRING",
>              help="package glob to exclude (may be listed multiple times)")
>      optional.add_option("-i", "--installpkgs", default=[],
>              action="append", metavar="STRING",
>              help="package glob to install before runtime-install.tmpl runs. (may be listed multiple times)")
>      optional.add_argument("-e", "--excludepkgs", default=[],
>              action="append", metavar="PACKAGE",
>              help="package glob to remove before runtime-install.tmpl runs. (may be listed multiple times)")
>      optional.add_option("--buildarch", default=None,
>              help="build architecture", metavar="STRING")
> ...
>
> lorax-19.7.19-1 which I was using previously, has the -e option using using optional.add_option().
>
> So, Pat, is there a lorax version that doesn't have that in that you used for 7.7, or am I missing a python2 update that adds the "add_argument" method?
>
>

I suspect the system I ran the compose with didn't have the 7.7 lorax 
(and had the 7.6).  I'll take a look.  You can do a quick fix for now 
and set `add_argument` to `add_option` and it should run for the moment.

Pat

-- 
Pat Riehecky

Fermi National Accelerator Laboratory
www.fnal.gov
www.scientificlinux.org

ATOM RSS1 RSS2