[vlc-commits] address review comment

Alberto Invernizzi git at videolan.org
Wed Apr 29 13:12:38 CEST 2020


vlc/python | branch: master | Alberto Invernizzi <alby.inve at gmail.com> | Thu Apr  2 18:53:10 2020 +0200| [3b67be4b43fb847deebdcd9c9498876ba23815d9] | committer: Alberto Invernizzi

address review comment
remove superflous try..except block

> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=3b67be4b43fb847deebdcd9c9498876ba23815d9
---

 generator/generate.py | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/generator/generate.py b/generator/generate.py
index be160b6..c4b3e00 100755
--- a/generator/generate.py
+++ b/generator/generate.py
@@ -758,15 +758,12 @@ class Parser(object):
             # normalize spaces
             param_raw = re.sub('\s+', ' ', param_raw)
 
-            try:
-                split_value = param_raw.split(' ')
-                if len(split_value) > 1:
-                    param_name = split_value[-1]
-                    param_type = ' '.join(split_value[:-1])
-                else:
-                    param_type = split_value[0]
-                    param_name = ''
-            except:
+            split_value = param_raw.split(' ')
+            if len(split_value) > 1:
+                param_name = split_value[-1]
+                param_type = ' '.join(split_value[:-1])
+            else:
+                param_type = split_value[0]
                 param_name = ''
 
             param_constness = [False]



More information about the vlc-commits mailing list