[Yum] Updating Python

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

 



On Tue, Jul 12, 2005 at 02:04:19PM -0400, seth vidal wrote:
> you're added to it - and now you can add other people to the editgroup
> for yum files.

Excellent. Will try not to cause too much trouble.

Back to the original thing.... would it be useful to do something like the
following? I know the compare-exception-value-string is kludgy/bad, but if
it were to happen to break, that wouldn't be too bad, since it would just
fail to match and then print out the exception value....


--- /usr/bin/yum	2005-07-08 10:18:43.000000000 -0400
+++ yum	2005-07-12 15:17:58.000000000 -0400
@@ -3,10 +3,17 @@
 try:
    import yum
 except ImportError:
-   print >> sys.stderr, "The yum libraries do not seem to be available \
-on your system for this version of python ", sys.version
-   print >> sys.stderr, "Please make sure the package you used to install \
-yum was built for your install of python."
+   if str(sys.exc_value) == 'No module named yum':
+      print >> sys.stderr, "The yum libraries do not seem to be available \
+on your system for this version of Python ", sys.version
+      print >> sys.stderr, "Please make sure the package you used to install \
+yum was built for your install of Python."
+   else:
+      print >> sys.stderr, "There was an error importing one of the Python \
+modules required to run yum:"
+      print >> sys.stderr, "  " + str(sys.exc_value)
+      print >> sys.stderr, "Please install a package which provides this \
+module, and try again."
    sys.exit(1)
 
 sys.path.insert(0, '/usr/share/yum-cli')




-- 
Matthew Miller           mattdm@xxxxxxxxxx        <http://www.mattdm.org/>
Boston University Linux      ------>                <http://linux.bu.edu/>
Current office temperature: 76 degrees Fahrenheit.

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux