~ubuntu-branches/ubuntu/hardy/screenlets/hardy

« back to all changes in this revision

Viewing changes to debian/patches/17_fix-crash-on-invalid-archive.patch

  • Committer: Bazaar Package Importer
  • Author(s): Kjell Braden
  • Date: 2008-04-07 17:05:29 UTC
  • Revision ID: james.westby@ubuntu.com-20080407170529-8e20cl37qk77bg5o
Tags: 0.0.12-0ubuntu4
* This is a bugfix upload. (LP: #213385)
* debian/patches/10-problem-on-create-tmpfile.patch: dropped, didn't fix the
  issue
* new patches from upstream:
  - debian/patches/15_better-daemon-running-check.patch: fix daemon starting
    multiple times (LP: #205526)
  - debian/patches/16_fix-option-theme-dialog-crashing.patch: fix a crash
    occuring in some theme dialogues (LP: #195036)
  - debian/patches/17_fix-crash-on-invalid-archive.patch: fix a crash
    occuring when trying to open broken screenlet packages (LP: #205526)
* new patches from ubuntu:
  - debian/patches/14_no-unnecessary-updates-when-unmapped.patch: don't
    update the screenlets when they are not mapped, thanks criser
    (LP: #211525)
  - debian/patches/18_fix-crashing-on-invalid-sensor-type.patch: fix a crash
    occuring in the sensor applet when a bad device was selected for
    monitoring (LP: #198675)
  - debian/patches/19_fix-creating-tempfile.patch: improve the error
    handling when initializing the tempfile (LP: #197712, #212175)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff -Nur -x '*.orig' -x '*~' screenlets-0.0.12/src/share/screenlets-manager/screenlets-manager.py screenlets-0.0.12.new/src/share/screenlets-manager/screenlets-manager.py
 
2
--- screenlets-0.0.12/src/share/screenlets-manager/screenlets-manager.py        2008-04-06 19:34:07.000000000 +0200
 
3
+++ screenlets-0.0.12.new/src/share/screenlets-manager/screenlets-manager.py    2008-04-06 19:35:41.000000000 +0200
 
4
@@ -155,9 +155,9 @@
 
5
                                        name = f
 
6
                try:
 
7
                        print name
 
8
+                       return (name, ext)
 
9
                except:
 
10
-                       screenlets.show_message(None,"Archive damaged or unsuported, only tar , bz2 or gz.")
 
11
-               return (name, ext)
 
12
+                       return False
 
13
        
 
14
        def get_result_message (self):
 
15
                """Return a human-readable result message about the last operation."""
 
16
@@ -180,6 +180,9 @@
 
17
                #name           = basename[:basename.find('.')]
 
18
                #print name
 
19
                info = self.get_info_from_package_name(filename)
 
20
+               if info == False:
 
21
+                       self._message= _("Archive is damaged or unsupported, use only tar, bz2 or gz.")
 
22
+                       return False
 
23
                name    = info[0]
 
24
                ext             = info[1]
 
25