mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-03 17:50:11 +02:00
Apply some autopep8-python2 suggestions
This commit is contained in:
parent
e39602586f
commit
14f654fabc
2
fdroid
2
fdroid
@ -40,7 +40,7 @@ commands = {
|
|||||||
"scanner": "Scan the source code of a package",
|
"scanner": "Scan the source code of a package",
|
||||||
"stats": "Update the stats of the repo",
|
"stats": "Update the stats of the repo",
|
||||||
"server": "Interact with the repo HTTP server",
|
"server": "Interact with the repo HTTP server",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def print_help():
|
def print_help():
|
||||||
|
@ -391,6 +391,7 @@ def getsrclibvcs(name):
|
|||||||
|
|
||||||
|
|
||||||
class vcs:
|
class vcs:
|
||||||
|
|
||||||
def __init__(self, remote, local):
|
def __init__(self, remote, local):
|
||||||
|
|
||||||
# svn, git-svn and bzr may require auth
|
# svn, git-svn and bzr may require auth
|
||||||
@ -439,8 +440,7 @@ class vcs:
|
|||||||
writeback = False
|
writeback = False
|
||||||
else:
|
else:
|
||||||
deleterepo = True
|
deleterepo = True
|
||||||
logging.info(
|
logging.info("Repository details for %s changed - deleting" % (
|
||||||
"Repository details for %s changed - deleting" % (
|
|
||||||
self.local))
|
self.local))
|
||||||
else:
|
else:
|
||||||
deleterepo = True
|
deleterepo = True
|
||||||
@ -592,7 +592,8 @@ class vcs_git(vcs):
|
|||||||
def latesttags(self, alltags, number):
|
def latesttags(self, alltags, number):
|
||||||
self.checkrepo()
|
self.checkrepo()
|
||||||
p = FDroidPopen(['echo "' + '\n'.join(alltags) + '" | '
|
p = FDroidPopen(['echo "' + '\n'.join(alltags) + '" | '
|
||||||
+ 'xargs -I@ git log --format=format:"%at @%n" -1 @ | '
|
+
|
||||||
|
'xargs -I@ git log --format=format:"%at @%n" -1 @ | '
|
||||||
+ 'sort -n | awk \'{print $2}\''],
|
+ 'sort -n | awk \'{print $2}\''],
|
||||||
cwd=self.local, shell=True, output=False)
|
cwd=self.local, shell=True, output=False)
|
||||||
return p.output.splitlines()[-number:]
|
return p.output.splitlines()[-number:]
|
||||||
@ -1005,6 +1006,7 @@ def parse_androidmanifests(paths, ignoreversions=None):
|
|||||||
|
|
||||||
|
|
||||||
class FDroidException(Exception):
|
class FDroidException(Exception):
|
||||||
|
|
||||||
def __init__(self, value, detail=None):
|
def __init__(self, value, detail=None):
|
||||||
self.value = value
|
self.value = value
|
||||||
self.detail = detail
|
self.detail = detail
|
||||||
@ -1610,6 +1612,7 @@ def isApkDebuggable(apkfile, config):
|
|||||||
|
|
||||||
|
|
||||||
class AsynchronousFileReader(threading.Thread):
|
class AsynchronousFileReader(threading.Thread):
|
||||||
|
|
||||||
'''
|
'''
|
||||||
Helper class to implement asynchronous reading of a file
|
Helper class to implement asynchronous reading of a file
|
||||||
in a separate thread. Pushes read lines on a queue to
|
in a separate thread. Pushes read lines on a queue to
|
||||||
|
@ -125,7 +125,7 @@ regex_pedantic = {
|
|||||||
(re.compile(r'.*[a-z0-9][.,!?][ $]'),
|
(re.compile(r'.*[a-z0-9][.,!?][ $]'),
|
||||||
"Punctuation should be avoided"),
|
"Punctuation should be avoided"),
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@ -29,6 +29,7 @@ srclibs = None
|
|||||||
|
|
||||||
|
|
||||||
class MetaDataException(Exception):
|
class MetaDataException(Exception):
|
||||||
|
|
||||||
def __init__(self, value):
|
def __init__(self, value):
|
||||||
self.value = value
|
self.value = value
|
||||||
|
|
||||||
@ -69,7 +70,7 @@ app_defaults = OrderedDict([
|
|||||||
('Current Version', ''),
|
('Current Version', ''),
|
||||||
('Current Version Code', '0'),
|
('Current Version Code', '0'),
|
||||||
('No Source Since', ''),
|
('No Source Since', ''),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
# In the order in which they are laid out on files
|
# In the order in which they are laid out on files
|
||||||
@ -102,7 +103,7 @@ flag_defaults = OrderedDict([
|
|||||||
('preassemble', []),
|
('preassemble', []),
|
||||||
('antcommands', None),
|
('antcommands', None),
|
||||||
('novcheck', False),
|
('novcheck', False),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
# Designates a metadata field type and checks that it matches
|
# Designates a metadata field type and checks that it matches
|
||||||
@ -222,7 +223,7 @@ valuetypes = {
|
|||||||
r"^(Tags|Tags .+|RepoManifest|RepoManifest/.+|RepoTrunk|HTTP|Static|None)$", None,
|
r"^(Tags|Tags .+|RepoManifest|RepoManifest/.+|RepoTrunk|HTTP|Static|None)$", None,
|
||||||
["Update Check Mode"],
|
["Update Check Mode"],
|
||||||
[])
|
[])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Check an app's metadata information for integrity errors
|
# Check an app's metadata information for integrity errors
|
||||||
|
@ -98,7 +98,7 @@ cachefiles = [
|
|||||||
('Kivy-1.7.2.tar.gz',
|
('Kivy-1.7.2.tar.gz',
|
||||||
'https://pypi.python.org/packages/source/K/Kivy/Kivy-1.7.2.tar.gz',
|
'https://pypi.python.org/packages/source/K/Kivy/Kivy-1.7.2.tar.gz',
|
||||||
'0485e2ef97b5086df886eb01f8303cb542183d2d71a159466f99ad6c8a1d03f1'),
|
'0485e2ef97b5086df886eb01f8303cb542183d2d71a159466f99ad6c8a1d03f1'),
|
||||||
]
|
]
|
||||||
|
|
||||||
if config['arch64']:
|
if config['arch64']:
|
||||||
cachefiles.extend([
|
cachefiles.extend([
|
||||||
|
Loading…
Reference in New Issue
Block a user