chiark / gitweb /
Exception handling improvements
[fdroidserver.git] / fdroidserver / checkupdates.py
index ae185350bc378737784977248793f54b051de5d7..6ab4e236156ec0c64e347c83361a8521998bcab9 100644 (file)
@@ -32,8 +32,7 @@ import logging
 
 import common
 import metadata
-from common import BuildException
-from common import VCSException
+from common import BuildException, VCSException
 from metadata import MetaDataException
 
 
@@ -102,6 +101,9 @@ def check_tags(app, pattern):
         if repotype not in ('git', 'git-svn', 'hg', 'bzr'):
             return (None, 'Tags update mode only works for git, hg, bzr and git-svn repositories currently', None)
 
+        if repotype == 'git-svn' and ';' not in app['Repo']:
+            return (None, 'Tags update mode used in git-svn, but the repo was not set up with tags', None)
+
         # Set up vcs interface and make sure we have the latest code...
         vcs = common.getvcs(app['Repo Type'], app['Repo'], build_dir)
 
@@ -330,7 +332,6 @@ def main():
 
     # Get all apps...
     allapps = metadata.read_metadata()
-    metadata.read_srclibs()
 
     apps = common.read_app_args(args, allapps, False)
 
@@ -491,7 +492,8 @@ def main():
 
                 if not gotcur:
                     newbuild = latest.copy()
-                    del newbuild['origlines']
+                    if 'origlines' in newbuild:
+                        del newbuild['origlines']
                     newbuild['disable'] = False
                     newbuild['vercode'] = app['Current Version Code']
                     newbuild['version'] = app['Current Version'] + suffix