to use a full MD5 checksum of all files to detect changes.
'''
- logging.debug('using s3cmd to sync with ' + config['awsbucket'])
+ logging.debug(_('Using s3cmd to sync with: {url}')
+ .format(url=config['awsbucket']))
configfilename = '.s3cfg'
fd = os.open(configfilename, os.O_CREAT | os.O_TRUNC | os.O_WRONLY, 0o600)
Requires AWS credentials set in config.py: awsaccesskeyid, awssecretkey
'''
- logging.debug('using Apache libcloud to sync with ' + config['awsbucket'])
+ logging.debug(_('using Apache libcloud to sync with {url}')
+ .format(url=config['awsbucket']))
import libcloud.security
libcloud.security.VERIFY_SSL_CERT = True
if not config.get('awsaccesskeyid') or not config.get('awssecretkey'):
raise FDroidException(
- 'To use awsbucket, you must set awssecretkey and awsaccesskeyid in config.py!')
+ _('To use awsbucket, awssecretkey and awsaccesskeyid must also be set in config.py!'))
awsbucket = config['awsbucket']
cls = get_driver(Provider.S3)
container = driver.get_container(container_name=awsbucket)
except ContainerDoesNotExistError:
container = driver.create_container(container_name=awsbucket)
- logging.info('Created new container "' + container.name + '"')
+ logging.info(_('Created new container "{name}"')
+ .format(name=container.name))
upload_dir = 'fdroid/' + repo_section
objs = dict()
repo.git.add(all=True)
repo.index.commit("fdroidserver git-mirror: Deploy to GitLab Pages")
- logging.debug('Pushing to ' + remote.url)
+ logging.debug(_('Pushing to {url}').format(url=remote.url))
with repo.git.custom_environment(GIT_SSH_COMMAND=ssh_cmd):
pushinfos = remote.push('master', force=True, set_upstream=True, progress=progress)
for pushinfo in pushinfos:
'''
import git
- logging.info('Pushing binary transparency log to ' + git_remote)
+ logging.info(_('Pushing binary transparency log to {url}')
+ .format(url=git_remote))
if os.path.isdir(os.path.dirname(git_remote)):
# from offline machine to thumbdrive
logging.error(_('local_copy_dir must be directory, not a file!'))
sys.exit(1)
if not os.path.exists(os.path.dirname(fdroiddir)):
- logging.error('The root dir for local_copy_dir "'
- + os.path.dirname(fdroiddir)
- + '" does not exist!')
+ logging.error(_('The root dir for local_copy_dir "{path}" does not exist!')
+ .format(path=os.path.dirname(fdroiddir)))
sys.exit(1)
if not os.path.isabs(fdroiddir):
logging.error(_('local_copy_dir must be an absolute path!'))
sys.exit(1)
repobase = os.path.basename(fdroiddir)
if standardwebroot and repobase != 'fdroid':
- logging.error('local_copy_dir does not end with "fdroid", '
- + 'perhaps you meant: ' + fdroiddir + '/fdroid')
+ logging.error(_('local_copy_dir does not end with "fdroid", '
+ + 'perhaps you meant: "{path}"')
+ .format(path=fdroiddir + '/fdroid'))
sys.exit(1)
if local_copy_dir[-1] != '/':
local_copy_dir += '/'