Re: [PATCH] Complete the list of programming exceptions we raise from runRescue.

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

 



Saner version of the same patch attached.

diff --git a/rescue.py b/rescue.py
index 688266f..030192e 100644
--- a/rescue.py
+++ b/rescue.py
@@ -379,16 +379,9 @@ def runRescue(anaconda, instClass):
                         os.symlink ("/usr/bin/bash", "/bin/bash")
                 except:
                     pass
-        except:
-            # This looks horrible, but all it does is catch every exception,
-            # and reraise those in the tuple check. This lets programming
-            # errors raise exceptions, while any runtime error will
-            # still result in a shell
-            (exc, val) = sys.exc_info()[0:2]
-            log.error(str(exc)+": "+str(val))
-            if exc in (IndexError, ValueError, SyntaxError):
-                raise exc, val, sys.exc_info()[2]
-
+        except (IndexError, KeyError, ValueError, SyntaxError, TypeError, AttributeError):
+            raise
+        except Exception:
             if anaconda.isKickstart:
                 log.error("An error occurred trying to mount some or all of your system")
             else:
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[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