summaryrefslogtreecommitdiff
path: root/lib/thandy/ClientCLI.py
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-11-17 01:48:56 +0000
committerNick Mathewson <nickm@torproject.org>2008-11-17 01:48:56 +0000
commitf1b79ebf1ff0df76c07e21a58dddc4f1840015d2 (patch)
tree5edc1ab87d5507da4a290a0bcf0af662c0750da0 /lib/thandy/ClientCLI.py
parent92b784be5aa3fbb05d74d45b11bc5c027f1054a3 (diff)
Add a --force-check option to make the client download a new timestamp file whether it is too old or not. Crank the maximum timestamp age down to 3 hours.
git-svn-id: file:///home/or/svnrepo/updater/trunk@17306 55e972cd-5a19-0410-ae62-a4d7a52db4cd
Diffstat (limited to 'lib/thandy/ClientCLI.py')
-rw-r--r--lib/thandy/ClientCLI.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/thandy/ClientCLI.py b/lib/thandy/ClientCLI.py
index 05f3647..3a8b760 100644
--- a/lib/thandy/ClientCLI.py
+++ b/lib/thandy/ClientCLI.py
@@ -20,13 +20,14 @@ def update(args):
"loop", "no-packagesys",
"install", "socks-port=",
"debug", "info",
- "warn"])
+ "warn", "force-check"])
download = True
keep_looping = False
use_packagesys = True
install = False
socksPort = None
logLevel = logging.INFO
+ forceCheck = False
for o, v in options:
if o == '--repo':
@@ -47,6 +48,8 @@ def update(args):
logLevel = logging.INFO
elif o == '--warn':
logLevel = logging.WARN
+ elif o == '--force-check':
+ forceCheck = True
logging.basicConfig(level=logLevel)
@@ -69,6 +72,10 @@ def update(args):
pkgSystems=packagesys,
installableDict=installable)
+ if forceCheck:
+ files.add("/meta/timestamp.txt")
+ forceCheck = False
+
if installable and not files:
logging.info("Ready to install files: %s",
", ".join(sorted(installable.keys())))