Guys - I need to head to bed , here's the hg patch if you want to commit it. Its been tested by Michal and myself.

JR


# HG changeset patch
# User John Rice <[EMAIL PROTECTED]>
# Date 1226975609 0
# Node ID 4b322d3b047dbc3a88120893f1a683ad1f6c2fdf
# Parent  ebec0aea3a6fa0c62ae2d52d0679af2004c633ba
5172 UM throws stack trace when no network is present during Update All

diff -r ebec0aea3a6f -r 4b322d3b047d src/updatemanager.py
--- a/src/updatemanager.py    Sun Nov 16 20:01:08 2008 +0000
+++ b/src/updatemanager.py    Tue Nov 18 02:33:29 2008 +0000
@@ -1210,7 +1210,9 @@
self.__cleanup() return 1
                except (Exception), uex:
- if uex.args[0] == errno.EDQUOT or uex.args[0] == errno.ENOSPC:
+                        if (isinstance(uex, EnvironmentError) and
+                                (uex.errno == errno.EDQUOT or
+                                uex.errno == errno.ENOSPC)):
                                self.__handle_update_progress_error(\
                                        self._(\
"%s exceded available disc space" % (what_msg)), \


jmr wrote:
David and Danek, do you want me to commit this?

JR

Michal Pryc wrote:
John,
Actully it's getting early morning :)

Yes I can confirm that with this webrev the UM behaves fine without network.

best
Michal

jmr wrote:
Ahmm - Danek, its getting late over here.

JR

jmr wrote:
Dabek - here's the new webrev incorporating your suggestions:

http://cr.opensolaris.org/~jmr/um_5172_v2_Nov18/

Michal has just tested it and gets the following output:

ERROR
Update All unexpected error:
Could not retrieve filelist from 'http://osol-re.sfbay.sun.com'
URLError reason: (8, 'node name or service name not known')

Which is the same as the CLI.

JR

Danek Duvall wrote:
On Tue, Nov 18, 2008 at 01:12:41AM +0000, jmr wrote:


Webrev: http://cr.opensolaris.org/~jmr/um_5172_v1_Nov18/
That isn't strictly correct -- uex.args could be an object that
evaluates
True, but still isn't subscriptable, like, say, an integer.

Why not have an except clause to handle EnvironmentError and test
uex.errno? That's how most of the rest of our code deals with this.

Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

# HG changeset patch
# User John Rice <[EMAIL PROTECTED]>
# Date 1226975609 0
# Node ID 4b322d3b047dbc3a88120893f1a683ad1f6c2fdf
# Parent  ebec0aea3a6fa0c62ae2d52d0679af2004c633ba
5172 UM throws stack trace when no network is present during Update All

diff -r ebec0aea3a6f -r 4b322d3b047d src/updatemanager.py
--- a/src/updatemanager.py      Sun Nov 16 20:01:08 2008 +0000
+++ b/src/updatemanager.py      Tue Nov 18 02:33:29 2008 +0000
@@ -1210,7 +1210,9 @@
                         self.__cleanup()                
                         return 1
                 except (Exception), uex:
-                        if uex.args[0] == errno.EDQUOT or uex.args[0] == 
errno.ENOSPC:
+                        if (isinstance(uex, EnvironmentError) and
+                                (uex.errno == errno.EDQUOT or
+                                uex.errno == errno.ENOSPC)):
                                 self.__handle_update_progress_error(\
                                         self._(\
                                         "%s exceded available disc space" % 
(what_msg)), \
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to