umit higwidgets conflits
Bug #264750 reported by
kop
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
umit (Ubuntu) |
Fix Released
|
Undecided
|
kop |
Bug Description
Binary package hint: umit
The attachment patch fixed conflicts with other higwidgets installed in python path.
Sample: if you install zenmap, Umit didn't run. Now fixed.
Related branches
Changed in umit: | |
status: | Incomplete → Fix Committed |
To post a comment you must log in.
Hi,
Thanks for the patch. I have a few comments.
First of all your changelog entry isn't very clear. You add two patches
and edit two more, but only mention two patches. Every change
should be documented clearly. Please explain for each what the
problem is you are fixing, and what the fix is.
As for the patches themselves,
-+ import gksu2
-+ gksu2.sudo('umit')
-+
++ try:
++ import gksu2
++ gksu2.sudo('umit')
++ except:
++ pass
it's not a good idea to have a bare "except:" clause, for instance CTRL-C
in that time will not do what it is supposed to. What is the problem
you are trying to catch, if it is one exception, e.g. ImportError then catch
it directly.
+- insert( uline, "sys.path. append( '%s')\n" % modules) insert( uline, "sys.path = ['%s'] + sys.path\n" % modules)
+- ucontent.
+ modules = "/usr/share/umit"
++ ucontent.
I think that's the path conflict fix, is that correct? Inserting modules at the
start of the path is usually frowned upon, as it overrides other installed
copies, and restricts the user's flexibility. Is it necessary here? Also
"sys.path.insert(0, %s) " % modules might be a clearer way to write that.
Why the addition of writing to a file at the end?
These fixes look important, but I would have to understand them better before
I would be willing to upload. Links to where they are reported/fixed upstream
would be very valuable.
I'm un-subscribing the sponsors for now. Please re-subscribe them when ready.
I'll remain subscribed in case you have any questions.
Thanks,
James