mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
Start rewriting options and config as common.py globals
This commit is contained in:
parent
1d88ba5450
commit
c3be06fb1d
12 changed files with 129 additions and 99 deletions
|
|
@ -82,14 +82,12 @@ def getrepofrompage(url):
|
|||
|
||||
return (None, "No information found." + page)
|
||||
|
||||
config = {}
|
||||
config = None
|
||||
options = None
|
||||
|
||||
def main():
|
||||
|
||||
# Read configuration...
|
||||
common.read_config(config)
|
||||
|
||||
import common
|
||||
global config, options
|
||||
|
||||
# Parse command line...
|
||||
parser = OptionParser()
|
||||
|
|
@ -103,6 +101,8 @@ def main():
|
|||
help="Allows a different revision (or git branch) to be specified for the initial import")
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
config = common.read_config(options)
|
||||
|
||||
if not options.url:
|
||||
print "Specify project url."
|
||||
sys.exit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue