fix rpm header not including 'VCS' tag
authorGui Chen <gui.chen@intel.com>
Tue, 25 Jun 2013 09:19:54 +0000 (05:19 -0400)
committerGui Chen <gui.chen@intel.com>
Tue, 25 Jun 2013 09:19:54 +0000 (05:19 -0400)
Signed-off-by: Gui Chen <gui.chen@intel.com>
plugins/backend/zypppkgmgr.py

index c760859..7ee83b6 100755 (executable)
@@ -567,7 +567,11 @@ class Zypp(BackendPlugin):
                         'version': hdr['version'],
                         'release': hdr['release']
                     }
-            self.__pkgs_vcsinfo[lname] = hdr['VCS']
+            try:
+                self.__pkgs_vcsinfo[lname] = hdr['VCS']
+            except ValueError:
+                # if rpm not support VCS, set to None
+                self.__pkgs_vcsinfo[lname] = None
 
         return self.__pkgs_vcsinfo