Re: urlgrabber in anaconda

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Looks pretty good in general.  Note that you'll want to s/import grabber/import
urlgrabber.grabber/.  We can pull in urlgrabber out of the yum package
until I separate it out.  Just add yum to PACKAGES in
scripts/upd-instroot and then add
usr/$LIBDIR/python?.?/site-packages/urlgrabber to the FILES list.

Okay, will do.

Index: comps.py
+       try:
+           file = grabber.urlopen (filename)
+       except grabber.URLGrabError, e:
+           log ("URLGrabError: %s occurred getting %s", e.strerror,
filename)

If there's an error getting the comps file here, we're going to hit a
traceback.  There were infinite retries before.  It's probably better to
raise something and have a reasonable error message pop up.

Alright, I'll do the same retry trick as elsewhere and then think up a
relevant exception to throw.

Index: hdrlist.py
+    try:
+        extra_args = { "retry": 5 }
+        file = grabber.urlopen (filename, **extra_args)

Why not
  file = grabber.urlopen(filename, retry = 5)
?

Unfamiliarity with this construct in Python, but Seth's answer makes it
sound like I planned this and did it on purpose so that's the one I'll
go with.

- Chris


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux