mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 07:20:29 +03:00
Other minor file reading fixes
This commit is contained in:
parent
241a3f02ac
commit
021df3c424
1 changed files with 14 additions and 13 deletions
|
|
@ -945,8 +945,7 @@ def get_library_references(root_dir):
|
||||||
proppath = os.path.join(root_dir, 'project.properties')
|
proppath = os.path.join(root_dir, 'project.properties')
|
||||||
if not os.path.isfile(proppath):
|
if not os.path.isfile(proppath):
|
||||||
return libraries
|
return libraries
|
||||||
with open(proppath) as f:
|
for line in file(proppath):
|
||||||
for line in f.readlines():
|
|
||||||
if not line.startswith('android.library.reference.'):
|
if not line.startswith('android.library.reference.'):
|
||||||
continue
|
continue
|
||||||
path = line.split('=')[1].strip()
|
path = line.split('=')[1].strip()
|
||||||
|
|
@ -1884,7 +1883,9 @@ def place_srclib(root_dir, number, libpath):
|
||||||
proppath = os.path.join(root_dir, 'project.properties')
|
proppath = os.path.join(root_dir, 'project.properties')
|
||||||
|
|
||||||
lines = []
|
lines = []
|
||||||
if os.path.isfile(proppath):
|
if not os.path.isfile(proppath):
|
||||||
|
return
|
||||||
|
|
||||||
with open(proppath, "r") as o:
|
with open(proppath, "r") as o:
|
||||||
lines = o.readlines()
|
lines = o.readlines()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue