chiark / gitweb /
When using placed srclibs, don't fail if proj.prop doesn't exist
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 27 Jan 2014 21:34:34 +0000 (22:34 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Mon, 27 Jan 2014 21:34:34 +0000 (22:34 +0100)
fdroidserver/common.py

index 4e4322c03295f9846cbde4fea79ba3f170c4ccdf..954a67f669bf7afbbdde9ee0b234679cb89ba8b9 100644 (file)
@@ -1497,8 +1497,10 @@ def place_srclib(root_dir, number, libpath):
     relpath = os.path.relpath(libpath, root_dir)
     proppath = os.path.join(root_dir, 'project.properties')
 
-    with open(proppath, "r") as o:
-        lines = o.readlines()
+    lines = []
+    if os.path.isfile(proppath):
+        with open(proppath, "r") as o:
+            lines = o.readlines()
 
     with open(proppath, "w") as o:
         placed = False