aboutsummaryrefslogtreecommitdiff
path: root/fetch.py
diff options
context:
space:
mode:
Diffstat (limited to 'fetch.py')
-rwxr-xr-xfetch.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/fetch.py b/fetch.py
index 49315d38..7203fe33 100755
--- a/fetch.py
+++ b/fetch.py
@@ -13,16 +13,19 @@ from pyaggr3g470r.models import User
if __name__ == "__main__":
# Point of entry in execution mode
+ users, feed_id = [], None
try:
- feed_id = int(sys.argv[2])
+ users = User.query.filter(User.id == int(sys.argv[1])).all()
except:
- feed_id = None
+ users = User.query.all()
+ finally:
+ if users == []:
+ users = User.query.all()
- users = []
try:
- users = User.query.filter(User.email == sys.argv[1]).all()
+ feed_id = int(sys.argv[2])
except:
- users = User.query.all()
+ feed_id = None
for user in users:
if user.activation_key == "":
bgstack15