r43779 - in /packages/unstable/alacarte/debian: changelog patches/40-itemeditor-command-validation.patch
mitya57-guest at users.alioth.debian.org
mitya57-guest at users.alioth.debian.org
Sun Oct 26 15:55:27 UTC 2014
Author: mitya57-guest
Date: Sun Oct 26 15:55:27 2014
New Revision: 43779
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=43779
Log:
Update validation code to the latest upstream commit
Modified:
packages/unstable/alacarte/debian/changelog
packages/unstable/alacarte/debian/patches/40-itemeditor-command-validation.patch
Modified: packages/unstable/alacarte/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/alacarte/debian/changelog?rev=43779&op=diff
==============================================================================
--- packages/unstable/alacarte/debian/changelog [utf-8] (original)
+++ packages/unstable/alacarte/debian/changelog [utf-8] Sun Oct 26 15:55:27 2014
@@ -2,8 +2,8 @@
[ Pedro Beja ]
* Add debian/patches/40-itemeditor-command-validation.patch
- - Fix bad command validation (Closes: #736166, #752671) thanks
- to OmegaPhil
+ - Fix bad command validation, thanks to OmegaPhil
+ (Closes: #736166, #752671)
[ Dmitry Shachnev ]
* Add a patch to fix TabError when importing MainWindow module.
Modified: packages/unstable/alacarte/debian/patches/40-itemeditor-command-validation.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/alacarte/debian/patches/40-itemeditor-command-validation.patch?rev=43779&op=diff
==============================================================================
--- packages/unstable/alacarte/debian/patches/40-itemeditor-command-validation.patch [utf-8] (original)
+++ packages/unstable/alacarte/debian/patches/40-itemeditor-command-validation.patch [utf-8] Sun Oct 26 15:55:27 2014
@@ -1,24 +1,22 @@
Description: fix bad command validation
-Origin: upstream, https://git.gnome.org/browse/alacarte/commit/?id=665b4715000e4f6b
+Origin: upstream
+ https://git.gnome.org/browse/alacarte/commit/?id=665b4715000e4f6b
+ https://git.gnome.org/browse/alacarte/commit/?id=ca7d05cc060e0a31
Last-Update: 2014-10-26
--- a/Alacarte/ItemEditor.py
+++ b/Alacarte/ItemEditor.py
-@@ -179,10 +179,24 @@ class LauncherEditor(ItemEditor):
+@@ -179,10 +179,20 @@
self.builder.get_object('name-entry').connect('changed', self.resync_validity)
self.builder.get_object('exec-entry').connect('changed', self.resync_validity)
+ def exec_line_is_valid(self, exec_text):
+ try:
-+ # Attempting to parse command - commands are not simply program names or paths... Errors are raised for blank or invalid input (e.g. missing closing quote)
-+ result = GLib.shell_parse_argv(exec_text)
-+ if result[0]:
-+ # Parsing succeeded - making sure program (first part of the command) is in the path
-+ command = result[1][0]
-+ return (GLib.find_program_in_path(command) is not None)
-+ else:
-+ # Parsing failure, but not reported via raised GError?
-+ return False
++ success, parsed = GLib.shell_parse_argv(exec_text)
++
++ # Make sure program (first part of the command) is in the path
++ command = parsed[0]
++ return (GLib.find_program_in_path(command) is not None)
+ except GLib.GError:
+ return False
+
More information about the pkg-gnome-commits
mailing list