| |
@@ -3,9 +3,6 @@
|
| |
from __future__ import print_function, absolute_import
|
| |
import os
|
| |
import argparse
|
| |
- from datetime import datetime, timedelta
|
| |
-
|
| |
- from sqlalchemy.exc import SQLAlchemyError
|
| |
|
| |
import pagure.config
|
| |
import pagure.lib.model as model
|
| |
@@ -22,13 +19,13 @@
|
| |
_config = pagure.config.reload_config()
|
| |
|
| |
|
| |
- def main(check=False, debug=False):
|
| |
- """ The function pulls in all the changes from upstream"""
|
| |
+ def main(debug=False):
|
| |
+ """The function pulls in all the changes from upstream"""
|
| |
|
| |
session = pagure.lib.model_base.create_session(_config["DB_URL"])
|
| |
projects = (
|
| |
session.query(model.Project)
|
| |
- .filter(model.Project.mirrored_from != None)
|
| |
+ .filter(model.Project.mirrored_from is not None)
|
| |
.all()
|
| |
)
|
| |
|
| |
@@ -47,14 +44,7 @@
|
| |
|
| |
if __name__ == "__main__":
|
| |
parser = argparse.ArgumentParser(
|
| |
- description="Script to send email before the api token expires"
|
| |
- )
|
| |
- parser.add_argument(
|
| |
- "--check",
|
| |
- dest="check",
|
| |
- action="store_true",
|
| |
- default=False,
|
| |
- help="Print the some output but does not send any email",
|
| |
+ description="Script to PULL external repos into local (mirroring)"
|
| |
)
|
| |
parser.add_argument(
|
| |
"--debug",
|
| |
Minor fix,
mirror_project_in.py
contained the argcheck
which wasn't used, also the description provided by thehelp
output was fromapi_key_expire_mail.py
. This PR removes the unused arg and adjusts the description to make clearer what the script is used for when triggered from the CLI.