1 |
nixphoeni 10/05/08 19:04:24 |
2 |
|
3 |
Modified: gdesklets-control-getid |
4 |
Added: gdesklets-core-getid-fix.patch |
5 |
Log: |
6 |
Added patch to try to fix bug #314653 |
7 |
(Portage version: 2.1.8.3/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.5 gnome-extra/gdesklets-core/files/gdesklets-control-getid |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-extra/gdesklets-core/files/gdesklets-control-getid?rev=1.5&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-extra/gdesklets-core/files/gdesklets-control-getid?rev=1.5&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-extra/gdesklets-core/files/gdesklets-control-getid?r1=1.4&r2=1.5 |
15 |
|
16 |
Index: gdesklets-control-getid |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/gnome-extra/gdesklets-core/files/gdesklets-control-getid,v |
19 |
retrieving revision 1.4 |
20 |
retrieving revision 1.5 |
21 |
diff -u -r1.4 -r1.5 |
22 |
--- gdesklets-control-getid 8 May 2010 03:20:21 -0000 1.4 |
23 |
+++ gdesklets-control-getid 8 May 2010 19:04:24 -0000 1.5 |
24 |
@@ -1,7 +1,7 @@ |
25 |
#!/usr/bin/env python2 |
26 |
# Copyright 1999-2010 Gentoo Foundation |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gdesklets-core/files/gdesklets-control-getid,v 1.4 2010/05/08 03:20:21 nixphoeni Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gdesklets-core/files/gdesklets-control-getid,v 1.5 2010/05/08 19:04:24 nixphoeni Exp $ |
30 |
# |
31 |
# A simple script to get the name and id from a Control. |
32 |
# Pretty much copied from test-control.py |
33 |
@@ -18,20 +18,16 @@ |
34 |
path = os.path.abspath(sys.argv[1]) |
35 |
folder, base = os.path.split(path) |
36 |
except: |
37 |
- #sys.exit("Usage: gdesklets-control-getid <control-directory>") |
38 |
- print "ERROR_IN_CONTROL_INSTALLATION" |
39 |
- |
40 |
+ sys.exit("ERROR IN CONTROL INSTALLATION") |
41 |
+ |
42 |
|
43 |
os.chdir(folder) |
44 |
try: |
45 |
module = __import__(base) |
46 |
- os.chdir(base) |
47 |
clss = module.get_class() |
48 |
- ctrl = clss() |
49 |
- |
50 |
+ |
51 |
except IOError: |
52 |
- #sys.exit("Could not load control %s." % (path)) |
53 |
- print folder |
54 |
+ sys.exit("Could not load control in %s!" % (folder)) |
55 |
|
56 |
# Get the string in the form of "IMyControl:hash" and translate it to |
57 |
# "MyControl_hash" |
58 |
|
59 |
|
60 |
|
61 |
1.1 gnome-extra/gdesklets-core/files/gdesklets-core-getid-fix.patch |
62 |
|
63 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-extra/gdesklets-core/files/gdesklets-core-getid-fix.patch?rev=1.1&view=markup |
64 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-extra/gdesklets-core/files/gdesklets-core-getid-fix.patch?rev=1.1&content-type=text/plain |
65 |
|
66 |
Index: gdesklets-core-getid-fix.patch |
67 |
=================================================================== |
68 |
--- main/__init__.py 2009-09-20 20:02:48 +0000 |
69 |
+++ main/__init__.py 2010-05-08 15:41:26 +0000 |
70 |
@@ -16,8 +16,11 @@ |
71 |
# case the DISPLAY variable doesn't contain the screen number) |
72 |
DISPLAY = vfs.escape_path(gtk.gdk.Display(os.environ["DISPLAY"]).get_name()).replace("/", "_") |
73 |
except: |
74 |
- print "Error: could not open display", os.environ["DISPLAY"] |
75 |
- sys.exit(1) |
76 |
+ try: |
77 |
+ print >> sys.stderr, "Error: could not open display", os.environ["DISPLAY"] |
78 |
+ except: |
79 |
+ print >> sys.stderr, "(could not get DISPLAY environment variable)" |
80 |
+ DISPLAY = "0" |