mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 23:40:29 +03:00
metadata: rename metafile to metadatapath when it is a path
To keep the code clear, change the code to use separate variables for the path to the metadata file, and for the file object of the opened metadata.
This commit is contained in:
parent
285c06d156
commit
6f334558df
3 changed files with 38 additions and 38 deletions
|
|
@ -493,14 +493,14 @@ def checkupdates_app(app, first=True):
|
|||
logging.warn('Invalid auto update mode "' + mode + '" on ' + app['id'])
|
||||
|
||||
if commitmsg:
|
||||
metafile = os.path.join('metadata', app['id'] + '.txt')
|
||||
metadata.write_metadata(metafile, app)
|
||||
metadatapath = os.path.join('metadata', app['id'] + '.txt')
|
||||
metadata.write_metadata(metadatapath, app)
|
||||
if options.commit:
|
||||
logging.info("Commiting update for " + metafile)
|
||||
logging.info("Commiting update for " + metadatapath)
|
||||
gitcmd = ["git", "commit", "-m", commitmsg]
|
||||
if 'auto_author' in config:
|
||||
gitcmd.extend(['--author', config['auto_author']])
|
||||
gitcmd.extend(["--", metafile])
|
||||
gitcmd.extend(["--", metadatapath])
|
||||
if subprocess.call(gitcmd) != 0:
|
||||
logging.error("Git commit failed")
|
||||
sys.exit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue