Add timestamp argument to tsp/scripts/crawler.py 28/108728/3
authorAleksander Mistewicz <a.mistewicz@samsung.com>
Wed, 9 Nov 2016 13:16:28 +0000 (14:16 +0100)
committerAleksander Mistewicz <a.mistewicz@samsung.com>
Mon, 16 Jan 2017 10:07:49 +0000 (11:07 +0100)
Change-Id: I9a1c51c024ea0b58b0e76b17e604743a30782065
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
tsp/scripts/crawler.py

index f2cc309..9ea25fd 100755 (executable)
@@ -121,6 +121,9 @@ def parse_arguments():
             action="store", dest="loglevel",
             help="Verbosity level")
 
+    parser.add_argument("-t", "--timestamp", default="timestamp",
+            help="File to read a reference timestamp from")
+
     args = parser.parse_args()
 
     return args
@@ -134,10 +137,9 @@ if '__main__' == __name__:
         logging.basicConfig(format='%(asctime)s %(message)s',level=numeric_level)
     logging.debug("Begin")
     snapshots = crawl(args.url)
-    timestamp_file = 'timestamp'
+    timestamp_file = args.timestamp
 
     if "snapshots" in args.url:
-        timestamp_file = 'timestamp_snapshot'
         discovered = snapshots
     else:
         discovered = set()